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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
excessiveField(Object o, Fields.FieldContext field)
Not usedboolean
incompatibleField(Object o, Field f, Fields.FieldContext field)
Converts collection types and non-primitive arraysboolean
missingField(Object o, Field field)
Not used
-
Constructor Details
-
JREFieldHandler
public JREFieldHandler()
-
-
Method Details
-
excessiveField
Not used- Specified by:
excessiveField
in 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:
missingField
in 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:
incompatibleField
in 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
-