org.sourceforge.jemm.database
Class FieldInfo

java.lang.Object
  extended by org.sourceforge.jemm.database.FieldInfo
All Implemented Interfaces:
java.io.Serializable

public class FieldInfo
extends java.lang.Object
implements java.io.Serializable

A fieldInfo represents all the information to do with a Field in a Java class. The name, its type for storage purposes and the class which originally declared the field. The class is stored to counter the potential problems shown by the following where both X should be stored twice by JEMM: public class A { private int X; } public class B extends A { private int X; }

Author:
Rory Graves, Paul Keeble
See Also:
ClassInfo, Serialized Form

Field Summary
 java.lang.String className
          The declaring class of the field
 java.lang.String fieldName
          The name of the field
 FieldType fieldType
          The type of the field
 
Constructor Summary
FieldInfo(java.lang.String fieldName, java.lang.Class<?> classType, FieldType fieldType)
          Creats a FieldInfo to represent the given class field.
FieldInfo(java.lang.String fieldName, java.lang.String className, FieldType fieldType)
          Create a FieldInfo to represent the given class field.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldName

public final java.lang.String fieldName
The name of the field


fieldType

public final FieldType fieldType
The type of the field


className

public final java.lang.String className
The declaring class of the field

Constructor Detail

FieldInfo

public FieldInfo(java.lang.String fieldName,
                 java.lang.String className,
                 FieldType fieldType)
Create a FieldInfo to represent the given class field.

Parameters:
fieldName - The name of the field.
className - The declaring class of the field.
fieldType - The type of the field.

FieldInfo

public FieldInfo(java.lang.String fieldName,
                 java.lang.Class<?> classType,
                 FieldType fieldType)
Creats a FieldInfo to represent the given class field.

Parameters:
fieldName - The name of the field.
classType - The declaring class type
fieldType - The type of the field.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.