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.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 Summary
Fields Modifier and Type Field Description private static org.glassfish.pfl.basic.reflection.Bridge
bridge
private ClassInfoCache.ClassInfo
cinfo
private java.lang.Class
clazz
private java.lang.reflect.Field
field
private long
fieldID
private java.lang.String
name
private java.lang.String
signature
private char
type
private java.lang.String
typeString
-
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 int
compareTo(java.lang.Object o)
Compare this with another ObjectStreamField.ClassInfoCache.ClassInfo
getClassInfo()
java.lang.Class
getClazz()
(package private) java.lang.reflect.Field
getField()
long
getFieldID()
java.lang.String
getName()
Get the name of this field.java.lang.String
getSignature()
java.lang.Class
getType()
Get the type of the field.char
getTypeCode()
java.lang.String
getTypeString()
boolean
isPrimitive()
test if this field is a primitive or not.(package private) void
setField(java.lang.reflect.Field field)
java.lang.String
toString()
Return a string describing this field.boolean
typeEquals(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:
compareTo
in 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:
toString
in classjava.lang.Object
-
getClazz
public java.lang.Class getClazz()
-
getFieldID
public long getFieldID()
-
-