Package ch.njol.yggdrasil.util
Class JREFieldHandler
java.lang.Object
ch.njol.yggdrasil.util.JREFieldHandler
- All Implemented Interfaces:
FieldHandler
Handles common JRE-related incompatible field types. This handler is not added by default and is merely a utility.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexcessiveField(Object o, Fields.FieldContext field)Not usedbooleanincompatibleField(Object o, Field f, Fields.FieldContext field)Converts collection types and non-primitive arraysbooleanmissingField(Object o, Field field)Not used
-
Constructor Details
-
JREFieldHandler
public JREFieldHandler()
-
-
Method Details
-
excessiveField
Not used- Specified by:
excessiveFieldin interfaceFieldHandler- Parameters:
o- The object whose filed is missingfield- The field read from stream- Returns:
- Whether this Handler handled the request
-
missingField
Not used- Specified by:
missingFieldin interfaceFieldHandler- Parameters:
o- The object whose filed is missingfield- The field that didn't occur in the stream- Returns:
- Whether this Handler handled the request
- Throws:
StreamCorruptedException
-
incompatibleField
public boolean incompatibleField(Object o, Field f, Fields.FieldContext field) throws StreamCorruptedExceptionConverts collection types and non-primitive arrays- Specified by:
incompatibleFieldin interfaceFieldHandler- Parameters:
o- The object the field belongs tof- The field to setfield- The field read from stream- Returns:
- Whether this Handler handled the request
- Throws:
StreamCorruptedException
-