org.drools.base
Class ClassFieldReader
java.lang.Object
org.drools.base.ClassFieldReader
- All Implemented Interfaces:
- Externalizable, Serializable, InternalReadAccessor, ReadAccessor
public class ClassFieldReader
- extends Object
- implements Externalizable, InternalReadAccessor
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.
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(Object obj)
|
BigDecimal |
getBigDecimalValue(InternalWorkingMemory workingMemory,
Object object)
|
BigDecimal |
getBigDecimalValue(Object object)
|
BigInteger |
getBigIntegerValue(InternalWorkingMemory workingMemory,
Object object)
|
BigInteger |
getBigIntegerValue(Object object)
|
boolean |
getBooleanValue(InternalWorkingMemory workingMemory,
Object object)
|
boolean |
getBooleanValue(Object object)
|
byte |
getByteValue(InternalWorkingMemory workingMemory,
Object object)
|
byte |
getByteValue(Object object)
|
char |
getCharValue(InternalWorkingMemory workingMemory,
Object object)
|
char |
getCharValue(Object object)
|
String |
getClassName()
|
double |
getDoubleValue(InternalWorkingMemory workingMemory,
Object object)
|
double |
getDoubleValue(Object object)
|
Class<?> |
getExtractToClass()
|
String |
getExtractToClassName()
|
String |
getFieldName()
|
float |
getFloatValue(InternalWorkingMemory workingMemory,
Object object)
|
float |
getFloatValue(Object object)
|
int |
getHashCode(InternalWorkingMemory workingMemory,
Object object)
|
int |
getHashCode(Object object)
|
int |
getIndex()
|
int |
getIntValue(InternalWorkingMemory workingMemory,
Object object)
|
int |
getIntValue(Object object)
|
long |
getLongValue(InternalWorkingMemory workingMemory,
Object object)
|
long |
getLongValue(Object object)
|
Method |
getNativeReadMethod()
|
short |
getShortValue(InternalWorkingMemory workingMemory,
Object object)
|
short |
getShortValue(Object object)
|
Object |
getValue(InternalWorkingMemory workingMemory,
Object object)
|
Object |
getValue(Object object)
|
ValueType |
getValueType()
|
int |
hashCode()
|
boolean |
isGlobal()
|
boolean |
isNullValue(InternalWorkingMemory workingMemory,
Object object)
|
boolean |
isNullValue(Object object)
|
boolean |
isSelfReference()
|
void |
readExternal(ObjectInput is)
|
void |
setReadAccessor(InternalReadAccessor reader)
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
ClassFieldReader
public ClassFieldReader()
ClassFieldReader
public ClassFieldReader(String className,
String fieldName)
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput is)
throws ClassNotFoundException,
IOException
- Specified by:
readExternal
in interface Externalizable
- Throws:
ClassNotFoundException
IOException
setReadAccessor
public void setReadAccessor(InternalReadAccessor reader)
getIndex
public int getIndex()
- Specified by:
getIndex
in interface ReadAccessor
getClassName
public String getClassName()
getFieldName
public String getFieldName()
getValue
public Object getValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getValue
in interface InternalReadAccessor
getValueType
public ValueType getValueType()
- Specified by:
getValueType
in interface ReadAccessor
getExtractToClass
public Class<?> getExtractToClass()
- Specified by:
getExtractToClass
in interface ReadAccessor
getExtractToClassName
public String getExtractToClassName()
- Specified by:
getExtractToClassName
in interface ReadAccessor
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
getBooleanValue
public boolean getBooleanValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getBooleanValue
in interface InternalReadAccessor
getByteValue
public byte getByteValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getByteValue
in interface InternalReadAccessor
getCharValue
public char getCharValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getCharValue
in interface InternalReadAccessor
getDoubleValue
public double getDoubleValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getDoubleValue
in interface InternalReadAccessor
getFloatValue
public float getFloatValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getFloatValue
in interface InternalReadAccessor
getIntValue
public int getIntValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getIntValue
in interface InternalReadAccessor
getLongValue
public long getLongValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getLongValue
in interface InternalReadAccessor
getShortValue
public short getShortValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getShortValue
in interface InternalReadAccessor
isNullValue
public boolean isNullValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
isNullValue
in interface InternalReadAccessor
getNativeReadMethod
public Method getNativeReadMethod()
- Specified by:
getNativeReadMethod
in interface ReadAccessor
getHashCode
public int getHashCode(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getHashCode
in interface InternalReadAccessor
isGlobal
public boolean isGlobal()
- Specified by:
isGlobal
in interface InternalReadAccessor
isSelfReference
public boolean isSelfReference()
- Specified by:
isSelfReference
in interface InternalReadAccessor
getBooleanValue
public boolean getBooleanValue(Object object)
- Specified by:
getBooleanValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getBooleanValue(java.lang.Object)
getByteValue
public byte getByteValue(Object object)
- Specified by:
getByteValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getByteValue(java.lang.Object)
getCharValue
public char getCharValue(Object object)
- Specified by:
getCharValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getCharValue(java.lang.Object)
getDoubleValue
public double getDoubleValue(Object object)
- Specified by:
getDoubleValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getDoubleValue(java.lang.Object)
getFloatValue
public float getFloatValue(Object object)
- Specified by:
getFloatValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getFloatValue(java.lang.Object)
getHashCode
public int getHashCode(Object object)
- Specified by:
getHashCode
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getHashCode(java.lang.Object)
getIntValue
public int getIntValue(Object object)
- Specified by:
getIntValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getIntValue(java.lang.Object)
getLongValue
public long getLongValue(Object object)
- Specified by:
getLongValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getLongValue(java.lang.Object)
getShortValue
public short getShortValue(Object object)
- Specified by:
getShortValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getShortValue(java.lang.Object)
getValue
public Object getValue(Object object)
- Specified by:
getValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.getValue(java.lang.Object)
isNullValue
public boolean isNullValue(Object object)
- Specified by:
isNullValue
in interface ReadAccessor
- Parameters:
object
-
- Returns:
- See Also:
ReadAccessor.isNullValue(java.lang.Object)
getBigDecimalValue
public BigDecimal getBigDecimalValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getBigDecimalValue
in interface InternalReadAccessor
getBigIntegerValue
public BigInteger getBigIntegerValue(InternalWorkingMemory workingMemory,
Object object)
- Specified by:
getBigIntegerValue
in interface InternalReadAccessor
getBigDecimalValue
public BigDecimal getBigDecimalValue(Object object)
- Specified by:
getBigDecimalValue
in interface ReadAccessor
getBigIntegerValue
public BigInteger getBigIntegerValue(Object object)
- Specified by:
getBigIntegerValue
in interface ReadAccessor
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.