Package ch.njol.yggdrasil
Interface FieldHandler
- All Known Implementing Classes:
JREFieldHandler
public interface FieldHandler
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexcessiveField(Object object, Fields.FieldContext field) Called when a loaded field doesn't exist.booleanincompatibleField(Object object, Field field, Fields.FieldContext context) Called when a loaded value is not compatible with the type of field.booleanmissingField(Object object, Field field) Called if a field was not found in the stream.
-
Method Details
-
excessiveField
Called when a loaded field doesn't exist.- Parameters:
object- 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:
object- 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 object, Field field, Fields.FieldContext context) throws StreamCorruptedException Called when a loaded value is not compatible with the type of field.- 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
-