Class WrapperKit
java.lang.Object
com.iohao.net.framework.protocol.wrapper.WrapperKit
Utility class for protocol wrapper type resolution.
Maintains a registry of supported primitive/boxed types and their corresponding
protocol wrapper classes (IntValue, LongValue, etc.). Provides
lookup methods to determine whether a type is a supported wrapper type and to
retrieve the associated ValueRecord.
- Author:
- 渔民小镇
- date:
- 2023-06-09
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleannotSupport(Class<?> clazz) Check whether the given class is not a supported wrapper type.static Optional<ValueRecord> optionalValueRecord(Class<?> clazz) Look up theValueRecordfor the given class.
-
Method Details
-
notSupport
Check whether the given class is not a supported wrapper type.- Parameters:
clazz- the class to check- Returns:
trueif the class is not a supported wrapper type
-
optionalValueRecord
Look up theValueRecordfor the given class.- Parameters:
clazz- the primitive, boxed, or wrapper class to look up- Returns:
- an
Optionalcontaining the ValueRecord, or empty if not found
-