Class ObjectStreamField

java.lang.Object
com.sun.corba.ee.impl.io.ObjectStreamField
All Implemented Interfaces:
Comparable

public class ObjectStreamField extends Object implements Comparable
A description of a field in a serializable class. A array of these is used to declare the persistent fields of a class.
  • Field Details

    • bridge

      private static final org.glassfish.pfl.basic.reflection.Bridge bridge
    • name

      private String name
    • type

      private char type
    • field

      private Field field
    • typeString

      private String typeString
    • clazz

      private Class clazz
    • cinfo

      private ClassInfoCache.ClassInfo cinfo
    • signature

      private String signature
    • fieldID

      private long fieldID
  • Constructor Details

    • ObjectStreamField

      public ObjectStreamField(String n, Class clazz)
    • ObjectStreamField

      public ObjectStreamField(Field field)
  • Method Details

    • getName

      public String getName()
      Get the name of this field.
      Returns:
      The field name
    • getClassInfo

      public ClassInfoCache.ClassInfo getClassInfo()
    • getType

      public Class getType()
      Get the type of the field.
      Returns:
      The type of the field
    • getTypeCode

      public char getTypeCode()
    • getTypeString

      public String getTypeString()
    • getField

      Field getField()
    • setField

      void setField(Field field)
    • isPrimitive

      public boolean isPrimitive()
      test if this field is a primitive or not.
      Returns:
      if this field is primitive.
    • compareTo

      public int compareTo(Object o)
      Compare this with another ObjectStreamField. return -1 if this is smaller, 0 if equal, 1 if greater types that are primitives are "smaller" than objects. if equal, the names are compared.
      Specified by:
      compareTo in interface Comparable
    • typeEquals

      public boolean typeEquals(ObjectStreamField other)
      Compare the types of two class descriptors. The match if they have the same primitive types. or if they are both objects and the object types match.
      Parameters:
      other - type to compare with
      Returns:
      if the two types are equivalent
    • getSignature

      public String getSignature()
    • toString

      public String toString()
      Return a string describing this field.
      Overrides:
      toString in class Object
    • getClazz

      public Class getClazz()
    • getFieldID

      public long getFieldID()