Package ch.njol.yggdrasil
Interface FieldHandler
- All Known Implementing Classes:
JREFieldHandler
public interface FieldHandler
-
Method Summary
Modifier and TypeMethodDescriptionboolean
excessiveField(Object o, Fields.FieldContext field)
Called when a loaded field doesn't exist.boolean
incompatibleField(Object o, Field f, Fields.FieldContext field)
Called when a loaded value is not compatible with the type of a field.boolean
missingField(Object o, Field field)
Called if a field was not found in the stream.
-
Method Details
-
excessiveField
Called when a loaded field doesn't exist.- Parameters:
o
- The object whose filed is missingfield
- The field read from stream- Returns:
- Whether this Handler handled the request
- Throws:
StreamCorruptedException
-
missingField
Called if a field was not found in the stream.- 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
boolean incompatibleField(Object o, Field f, Fields.FieldContext field) throws StreamCorruptedExceptionCalled when a loaded value is not compatible with the type of a field.- 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
-