Package org.datanucleus.enhancer
Class ClassField
- java.lang.Object
-
- org.datanucleus.enhancer.ClassField
-
public class ClassField extends Object
Representation of a field that an enhanced class requires.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
access
Access flags for the field (public, protected etc).protected ClassEnhancer
enhancer
The parent enhancer.protected String
fieldName
Name of the field.protected Object
initialValue
Initial value for the field.protected Object
type
Type for the field
-
Constructor Summary
Constructors Constructor Description ClassField(ClassEnhancer enhancer, String name, int access, Object type)
ConstructorClassField(ClassEnhancer enhancer, String name, int access, Object type, Object value)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Indicates whether some other object is "equal to" this one.int
getAccess()
Accessor for the accessObject
getInitialValue()
Accessor for the valueString
getName()
Accessor for the field nameObject
getType()
Accessor for the typeint
hashCode()
Return hash code of this instance.
-
-
-
Field Detail
-
enhancer
protected ClassEnhancer enhancer
The parent enhancer.
-
fieldName
protected String fieldName
Name of the field.
-
access
protected int access
Access flags for the field (public, protected etc).
-
type
protected Object type
Type for the field
-
initialValue
protected Object initialValue
Initial value for the field.
-
-
Constructor Detail
-
ClassField
public ClassField(ClassEnhancer enhancer, String name, int access, Object type)
Constructor- Parameters:
enhancer
- Class Enhancername
- Name of the fieldaccess
- Access for the field (PUBLIC, PROTECTED etc)type
- Type of the field
-
ClassField
public ClassField(ClassEnhancer enhancer, String name, int access, Object type, Object value)
Constructor- Parameters:
enhancer
- Class Enhancername
- Name of the fieldaccess
- Access for the field (PUBLIC, PROTECTED etc)type
- Type of the fieldvalue
- Initial value
-
-
Method Detail
-
getName
public String getName()
Accessor for the field name- Returns:
- Name of the field
-
getAccess
public int getAccess()
Accessor for the access- Returns:
- Access type for the field
-
getType
public Object getType()
Accessor for the type- Returns:
- Type of the field
-
getInitialValue
public Object getInitialValue()
Accessor for the value- Returns:
- Initial value of the field
-
hashCode
public int hashCode()
Return hash code of this instance.
-
-