Drools :: Core 6.1.0.Beta1

org.drools.core.base.extractors
Class MVELObjectClassFieldReader

java.lang.Object
  extended by org.drools.core.base.BaseClassFieldReader
      extended by org.drools.core.base.extractors.BaseObjectClassFieldReader
          extended by org.drools.core.base.extractors.MVELObjectClassFieldReader
All Implemented Interfaces:
Externalizable, Serializable, MVELClassFieldReader, MVELCompileable, InternalReadAccessor, ReadAccessor

public class MVELObjectClassFieldReader
extends BaseObjectClassFieldReader
implements Externalizable, MVELCompileable, MVELClassFieldReader

A class field extractor that uses MVEL engine to extract the actual value for a given expression. We use MVEL to resolve nested accessor expressions.

See Also:
Serialized Form

Constructor Summary
MVELObjectClassFieldReader()
           
MVELObjectClassFieldReader(String className, String expr, boolean typesafe)
           
 
Method Summary
 void compile(MVELDialectRuntimeData runtimeData)
           
static void doCompile(MVELClassFieldReader target, MVELDialectRuntimeData runtimeData)
           
 boolean equals(Object obj)
          
 String getClassName()
           
 String getExpression()
           
 Object getValue(InternalWorkingMemory workingMemory, Object object)
           
 int hashCode()
          
 boolean isTypeSafe()
           
 void readExternal(ObjectInput in)
           
 void setExecutableStatement(org.mvel2.compiler.ExecutableStatement expression)
           
 String toString()
          
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.core.base.extractors.BaseObjectClassFieldReader
getBooleanValue, getByteValue, getCharValue, getDoubleValue, getFloatValue, getHashCode, getIntValue, getLongValue, getNativeReadMethod, getNativeReadMethodName, getShortValue, isNullValue
 
Methods inherited from class org.drools.core.base.BaseClassFieldReader
getBigDecimalValue, getBigDecimalValue, getBigIntegerValue, getBigIntegerValue, getBooleanValue, getByteValue, getCharValue, getDoubleValue, getExtractToClass, getExtractToClassName, getFloatValue, getHashCode, getIndex, getIntValue, getLongValue, getShortValue, getValue, getValueType, isGlobal, isNullValue, isSelfReference, setFieldType, setIndex, setValueType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.core.base.extractors.MVELClassFieldReader
setFieldType, setValueType
 

Constructor Detail

MVELObjectClassFieldReader

public MVELObjectClassFieldReader()

MVELObjectClassFieldReader

public MVELObjectClassFieldReader(String className,
                                  String expr,
                                  boolean typesafe)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

setExecutableStatement

public void setExecutableStatement(org.mvel2.compiler.ExecutableStatement expression)
Specified by:
setExecutableStatement in interface MVELClassFieldReader

getClassName

public String getClassName()
Specified by:
getClassName in interface MVELClassFieldReader

isTypeSafe

public boolean isTypeSafe()
Specified by:
isTypeSafe in interface MVELClassFieldReader

getExpression

public String getExpression()
Specified by:
getExpression in interface MVELClassFieldReader

compile

public void compile(MVELDialectRuntimeData runtimeData)
Specified by:
compile in interface MVELCompileable

doCompile

public static void doCompile(MVELClassFieldReader target,
                             MVELDialectRuntimeData runtimeData)

getValue

public Object getValue(InternalWorkingMemory workingMemory,
                       Object object)
Specified by:
getValue in interface InternalReadAccessor
Specified by:
getValue in class BaseObjectClassFieldReader

hashCode

public int hashCode()

Overrides:
hashCode in class BaseClassFieldReader

equals

public boolean equals(Object obj)

Overrides:
equals in class BaseClassFieldReader

toString

public String toString()

Overrides:
toString in class Object

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.