Package ch.njol.yggdrasil.util
Class JREFieldHandler
java.lang.Object
ch.njol.yggdrasil.util.JREFieldHandler
- All Implemented Interfaces:
FieldHandler
Deprecated.
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 object, Fields.FieldContext field) Deprecated.Called when a loaded field doesn't exist.boolean
incompatibleField
(Object object, Field field, Fields.FieldContext context) Deprecated.Converts collection types and non-primitive arraysboolean
missingField
(Object object, Field field) Deprecated.Called if a field was not found in the stream.
-
Constructor Details
-
JREFieldHandler
public JREFieldHandler()Deprecated.
-
-
Method Details
-
excessiveField
Deprecated.Description copied from interface:FieldHandler
Called when a loaded field doesn't exist.- Specified by:
excessiveField
in interfaceFieldHandler
- Parameters:
object
- The object whose filed is missingfield
- The field read from stream- Returns:
- Whether this Handler handled the request
-
missingField
Deprecated.Description copied from interface:FieldHandler
Called if a field was not found in the stream.- Specified by:
missingField
in interfaceFieldHandler
- Parameters:
object
- The object whose filed is missingfield
- The field that didn't occur in the stream- Returns:
- Whether this Handler handled the request
-
incompatibleField
public boolean incompatibleField(Object object, Field field, Fields.FieldContext context) throws StreamCorruptedException Deprecated.Converts collection types and non-primitive arrays- Specified by:
incompatibleField
in interfaceFieldHandler
- Parameters:
object
- The object the field belongs tofield
- The field to setcontext
- The field read from stream- Returns:
- Whether this Handler handled the request
- Throws:
StreamCorruptedException
-