org.datanucleus.enhancer
Class ClassField

java.lang.Object
  extended by org.datanucleus.enhancer.ClassField

public class ClassField
extends java.lang.Object

Representation of a field that an enhanced class requires.


Field Summary
protected  int access
          Access flags for the field (public, protected etc).
protected  ClassEnhancer enhancer
          The parent enhancer.
protected  java.lang.String fieldName
          Name of the field.
protected  java.lang.Object initialValue
          Initial value for the field.
protected static org.datanucleus.util.Localiser LOCALISER
          Localisation of messages
protected  java.lang.Object type
          Type for the field
 
Constructor Summary
ClassField(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object type)
          Constructor
ClassField(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object type, java.lang.Object value)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 int getAccess()
          Accessor for the access
 java.lang.Object getInitialValue()
          Accessor for the value
 java.lang.String getName()
          Accessor for the field name
 java.lang.Object getType()
          Accessor for the type
 int hashCode()
          Return hash code of this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static org.datanucleus.util.Localiser LOCALISER
Localisation of messages


enhancer

protected ClassEnhancer enhancer
The parent enhancer.


fieldName

protected java.lang.String fieldName
Name of the field.


access

protected int access
Access flags for the field (public, protected etc).


type

protected java.lang.Object type
Type for the field


initialValue

protected java.lang.Object initialValue
Initial value for the field.

Constructor Detail

ClassField

public ClassField(ClassEnhancer enhancer,
                  java.lang.String name,
                  int access,
                  java.lang.Object type)
Constructor

Parameters:
enhancer - Class Enhancer
name - Name of the field
access - Access for the field (PUBLIC, PROTECTED etc)
type - Type of the field

ClassField

public ClassField(ClassEnhancer enhancer,
                  java.lang.String name,
                  int access,
                  java.lang.Object type,
                  java.lang.Object value)
Constructor

Parameters:
enhancer - Class Enhancer
name - Name of the field
access - Access for the field (PUBLIC, PROTECTED etc)
type - Type of the field
value - Initial value
Method Detail

getName

public java.lang.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 java.lang.Object getType()
Accessor for the type

Returns:
Type of the field

getInitialValue

public java.lang.Object getInitialValue()
Accessor for the value

Returns:
Initial value of the field

hashCode

public int hashCode()
Return hash code of this instance.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code of this instance

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.


Copyright © 2011. All Rights Reserved.