Methods Summary |
---|
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.
ObjectStreamField f2 = (ObjectStreamField)o;
boolean thisprim = (this.typeString == null);
boolean otherprim = (f2.typeString == null);
if (thisprim != otherprim) {
return (thisprim ? -1 : 1);
}
return this.name.compareTo(f2.name);
|
public java.lang.Class | getClazz()
return clazz;
|
java.lang.reflect.Field | getField()
return field;
|
public long | getFieldID()
return fieldID ;
|
public java.lang.String | getName()Get the name of this field.
return name;
|
public java.lang.String | getSignature()
return signature;
|
public java.lang.Class | getType()Get the type of the field.
if (clazz != null)
return clazz;
switch (type) {
case 'B": clazz = Byte.TYPE;
break;
case 'C": clazz = Character.TYPE;
break;
case 'S": clazz = Short.TYPE;
break;
case 'I": clazz = Integer.TYPE;
break;
case 'J": clazz = Long.TYPE;
break;
case 'F": clazz = Float.TYPE;
break;
case 'D": clazz = Double.TYPE;
break;
case 'Z": clazz = Boolean.TYPE;
break;
case '[":
case 'L":
clazz = Object.class;
break;
}
return clazz;
|
public char | getTypeCode()
return type;
|
public java.lang.String | getTypeString()
return typeString;
|
public boolean | isPrimitive()test if this field is a primitive or not.
return (type != '[" && type != 'L");
|
void | setField(java.lang.reflect.Field field)
this.field = field;
this.fieldID = bridge.objectFieldOffset( field ) ;
|
public java.lang.String | toString()Return a string describing this field.
if (typeString != null)
return typeString + " " + name;
else
return type + " " + name;
|
public boolean | typeEquals(com.sun.corba.se.impl.io.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.
if (other == null || type != other.type)
return false;
/* Return true if the primitive types matched */
if (typeString == null && other.typeString == null)
return true;
return ObjectStreamClass.compareClassNames(typeString,
other.typeString,
'/");
|