Interface MethodParser
public interface MethodParser
Action method parsing: parses method parameters, parses method return value
- Author:
- 渔民小镇
- date:
- 2022-06-26
-
Method Summary
Modifier and TypeMethodDescriptionClass<?> getActualClazz(ActualParameter parameterReturn) Get the actual class for the parameter or return type.Parse a single data value into the protocol-compatible format.parseDataList(Object data, DataCodec codec) Parse a list of data values into the protocol-compatible format.parseParam(byte[] data, ActionMethodParameter actionMethodParameter, DataCodec codec) Parses action method parameters
-
Method Details
-
getActualClazz
Get the actual class for the parameter or return type.For primitive-wrapper parsers this returns the corresponding protocol wrapper class (e.g.
IntValue,IntValueList). For the default parser it delegates toActualParameter.getActualTypeArgumentClass().- Parameters:
parameterReturn- the parameter or return type metadata- Returns:
- the actual class to use for codec operations
-
parseParam
Parses action method parameters- Parameters:
data- dataactionMethodParameter- paramInfocodec- codec- Returns:
- The parsed data
-
parseDataList
Parse a list of data values into the protocol-compatible format.Wraps the given list into the appropriate value-list wrapper type for serialization.
- Parameters:
data- the list of values returned by the action methodcodec- the data codec for encoding individual elements- Returns:
- the protocol-compatible list wrapper object
-
parseData
-