Package com.sun.corba.ee.impl.io
Class ObjectStreamField
- java.lang.Object
-
- com.sun.corba.ee.impl.io.ObjectStreamField
-
- All Implemented Interfaces:
java.lang.Comparable
public class ObjectStreamField extends java.lang.Object implements java.lang.ComparableA description of a field in a serializable class. A array of these is used to declare the persistent fields of a class.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.glassfish.pfl.basic.reflection.Bridgebridgeprivate ClassInfoCache.ClassInfocinfoprivate java.lang.Classclazzprivate java.lang.reflect.Fieldfieldprivate longfieldIDprivate java.lang.Stringnameprivate java.lang.Stringsignatureprivate chartypeprivate java.lang.StringtypeString
-
Constructor Summary
Constructors Constructor Description ObjectStreamField(java.lang.reflect.Field field)ObjectStreamField(java.lang.String n, java.lang.Class clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)Compare this with another ObjectStreamField.ClassInfoCache.ClassInfogetClassInfo()java.lang.ClassgetClazz()(package private) java.lang.reflect.FieldgetField()longgetFieldID()java.lang.StringgetName()Get the name of this field.java.lang.StringgetSignature()java.lang.ClassgetType()Get the type of the field.chargetTypeCode()java.lang.StringgetTypeString()booleanisPrimitive()test if this field is a primitive or not.(package private) voidsetField(java.lang.reflect.Field field)java.lang.StringtoString()Return a string describing this field.booleantypeEquals(ObjectStreamField other)Compare the types of two class descriptors.
-
-
-
Field Detail
-
bridge
private static final org.glassfish.pfl.basic.reflection.Bridge bridge
-
name
private java.lang.String name
-
type
private char type
-
field
private java.lang.reflect.Field field
-
typeString
private java.lang.String typeString
-
clazz
private java.lang.Class clazz
-
cinfo
private ClassInfoCache.ClassInfo cinfo
-
signature
private java.lang.String signature
-
fieldID
private long fieldID
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of this field.- Returns:
- The field name
-
getClassInfo
public ClassInfoCache.ClassInfo getClassInfo()
-
getType
public java.lang.Class getType()
Get the type of the field.- Returns:
- The type of the field
-
getTypeCode
public char getTypeCode()
-
getTypeString
public java.lang.String getTypeString()
-
getField
java.lang.reflect.Field getField()
-
setField
void setField(java.lang.reflect.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(java.lang.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:
compareToin interfacejava.lang.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 java.lang.String getSignature()
-
toString
public java.lang.String toString()
Return a string describing this field.- Overrides:
toStringin classjava.lang.Object
-
getClazz
public java.lang.Class getClazz()
-
getFieldID
public long getFieldID()
-
-