org.openejb.util.io
Class FieldDescriptor

java.lang.Object
  extended by org.openejb.util.io.FieldDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class FieldDescriptor
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

See Also:
Serialized Form

Field Summary
protected  ClassDescriptor classDesc
           
protected  java.lang.reflect.Field field
           
protected  java.lang.String name
           
protected  java.lang.Class type
           
protected  char typeCode
           
protected  java.lang.String typeString
           
 
Constructor Summary
FieldDescriptor(java.lang.reflect.Field field)
           
FieldDescriptor(java.lang.String name, java.lang.Class type)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare this field with another FieldDescriptor.
 ClassDescriptor getClassDescriptor()
           
 java.lang.reflect.Field getField()
           
 java.lang.String getName()
           
 char getTypeCode()
           
 java.lang.String getTypeString()
           
 void setClassDescriptor(ClassDescriptor classDesc)
           
 void setField(java.lang.reflect.Field field)
           
 void setName(java.lang.String name)
           
 void setTypeCode(char typeCode)
           
 void write(java.lang.Object o, ObjectOutputStream out)
           
 void writeDesc(ObjectOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeString

protected java.lang.String typeString

name

protected java.lang.String name

field

protected java.lang.reflect.Field field

typeCode

protected char typeCode

type

protected java.lang.Class type

classDesc

protected ClassDescriptor classDesc
Constructor Detail

FieldDescriptor

public FieldDescriptor(java.lang.reflect.Field field)

FieldDescriptor

public FieldDescriptor(java.lang.String name,
                       java.lang.Class type)
Method Detail

getTypeString

public java.lang.String getTypeString()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getField

public java.lang.reflect.Field getField()

setField

public void setField(java.lang.reflect.Field field)

getTypeCode

public char getTypeCode()

setTypeCode

public void setTypeCode(char typeCode)

compareTo

public int compareTo(java.lang.Object o)
Compare this field with another FieldDescriptor. Return -1 if this is smaller, 0 if equal, 1 if greater. Types that are primitives are "smaller" than object types. If equal, the field names are compared.

Specified by:
compareTo in interface java.lang.Comparable

getClassDescriptor

public ClassDescriptor getClassDescriptor()

setClassDescriptor

public void setClassDescriptor(ClassDescriptor classDesc)

writeDesc

public void writeDesc(ObjectOutputStream out)
               throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.lang.Object o,
                  ObjectOutputStream out)
           throws java.io.IOException,
                  java.io.InvalidClassException
Throws:
java.io.IOException
java.io.InvalidClassException


Copyright © 1999-2011 OpenEJB. All Rights Reserved.