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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexcessiveField(Object object, Fields.FieldContext field) Deprecated.Called when a loaded field doesn't exist.booleanincompatibleField(Object object, Field field, Fields.FieldContext context) Deprecated.Converts collection types and non-primitive arraysbooleanmissingField(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:FieldHandlerCalled when a loaded field doesn't exist.- Specified by:
excessiveFieldin 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:FieldHandlerCalled if a field was not found in the stream.- Specified by:
missingFieldin 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:
incompatibleFieldin 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
-