Class JREFieldHandler

java.lang.Object
ch.njol.yggdrasil.util.JREFieldHandler
All Implemented Interfaces:
FieldHandler

@Deprecated public class JREFieldHandler extends Object implements FieldHandler
Deprecated.
Handles common JRE-related incompatible field types. This handler is not added by default and is merely a utility.
  • Constructor Details

    • JREFieldHandler

      public JREFieldHandler()
      Deprecated.
  • Method Details

    • excessiveField

      public boolean excessiveField(Object object, Fields.FieldContext field)
      Deprecated.
      Description copied from interface: FieldHandler
      Called when a loaded field doesn't exist.
      Specified by:
      excessiveField in interface FieldHandler
      Parameters:
      object - The object whose filed is missing
      field - The field read from stream
      Returns:
      Whether this Handler handled the request
    • missingField

      public boolean missingField(Object object, Field field)
      Deprecated.
      Description copied from interface: FieldHandler
      Called if a field was not found in the stream.
      Specified by:
      missingField in interface FieldHandler
      Parameters:
      object - The object whose filed is missing
      field - 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 interface FieldHandler
      Parameters:
      object - The object the field belongs to
      field - The field to set
      context - The field read from stream
      Returns:
      Whether this Handler handled the request
      Throws:
      StreamCorruptedException