Class Fields

java.lang.Object
ch.njol.yggdrasil.Fields
All Implemented Interfaces:
Iterable<Fields.FieldContext>

@NotThreadSafe public final class Fields extends Object implements Iterable<Fields.FieldContext>
  • Constructor Details

    • Fields

      public Fields()
      Creates an empty Fields object.
    • Fields

      public Fields(Yggdrasil yggdrasil)
    • Fields

      public Fields(Class<?> type, Yggdrasil yggdrasil) throws NotSerializableException
      Creates a fields object and initialises it with all non-transient and non-static fields of the given class and its superclasses.
      Parameters:
      type - Some class
      Throws:
      NotSerializableException - If a field occurs more than once (i.e. if a class has a field with the same name as a field in one of its superclasses)
    • Fields

      public Fields(Object object) throws NotSerializableException
      Creates a fields object and initialises it with all non-transient and non-static fields of the given object.
      Parameters:
      object - Some object
      Throws:
      NotSerializableException - If a field occurs more than once (i.e. if a class has a field with the same name as a field in one of its superclasses)
    • Fields

      public Fields(Object object, @Nullable @Nullable Yggdrasil yggdrasil) throws NotSerializableException
      Creates a fields object and initialises it with all non-transient and non-static fields of the given object.
      Parameters:
      object - Some object
      Throws:
      NotSerializableException - If a field occurs more than once (i.e. if a class has a field with the same name as a field in one of its superclasses)
  • Method Details