org.drools.base
Class ClassFieldExtractor
java.lang.Object
org.drools.base.ClassFieldExtractor
- All Implemented Interfaces:
- java.io.Serializable, Extractor, FieldExtractor
public class ClassFieldExtractor
- extends java.lang.Object
- implements FieldExtractor
This provides access to fields, and what their numerical index/object type is.
This is basically a wrapper class around dynamically generated subclasses of
BaseClassFieldExtractor,
which allows serialization by regenerating the accessor classes
when needed.
- Author:
- Michael Neale
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(java.lang.Object object)
|
boolean |
getBooleanValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
byte |
getByteValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
char |
getCharValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
double |
getDoubleValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
java.lang.Class |
getExtractToClass()
|
java.lang.String |
getExtractToClassName()
|
java.lang.String |
getFieldName()
|
float |
getFloatValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
int |
getHashCode(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
int |
getIndex()
|
int |
getIntValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
long |
getLongValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
java.lang.reflect.Method |
getNativeReadMethod()
|
short |
getShortValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
java.lang.Object |
getValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
ValueType |
getValueType()
|
int |
hashCode()
|
boolean |
isGlobal()
|
boolean |
isNullValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ClassFieldExtractor
public ClassFieldExtractor(java.lang.Class clazz,
java.lang.String fieldName)
ClassFieldExtractor
public ClassFieldExtractor(java.lang.Class clazz,
java.lang.String fieldName,
java.lang.ClassLoader classLoader)
ClassFieldExtractor
public ClassFieldExtractor(java.lang.Class clazz,
java.lang.String fieldName,
java.lang.ClassLoader classLoader,
ClassFieldExtractorFactory factory)
getIndex
public int getIndex()
- Specified by:
getIndex
in interface FieldExtractor
getFieldName
public java.lang.String getFieldName()
getValue
public java.lang.Object getValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getValue
in interface Extractor
getValueType
public ValueType getValueType()
- Specified by:
getValueType
in interface Extractor
getExtractToClass
public java.lang.Class getExtractToClass()
- Specified by:
getExtractToClass
in interface Extractor
getExtractToClassName
public java.lang.String getExtractToClassName()
- Specified by:
getExtractToClassName
in interface Extractor
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
getBooleanValue
public boolean getBooleanValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getBooleanValue
in interface Extractor
getByteValue
public byte getByteValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getByteValue
in interface Extractor
getCharValue
public char getCharValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getCharValue
in interface Extractor
getDoubleValue
public double getDoubleValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getDoubleValue
in interface Extractor
getFloatValue
public float getFloatValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getFloatValue
in interface Extractor
getIntValue
public int getIntValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getIntValue
in interface Extractor
getLongValue
public long getLongValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getLongValue
in interface Extractor
getShortValue
public short getShortValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getShortValue
in interface Extractor
isNullValue
public boolean isNullValue(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
isNullValue
in interface Extractor
getNativeReadMethod
public java.lang.reflect.Method getNativeReadMethod()
- Specified by:
getNativeReadMethod
in interface Extractor
getHashCode
public int getHashCode(InternalWorkingMemory workingMemory,
java.lang.Object object)
- Specified by:
getHashCode
in interface Extractor
isGlobal
public boolean isGlobal()
- Specified by:
isGlobal
in interface Extractor