public class MvelConstraint extends MutableTypeConstraint implements IndexableConstraint, AcceptsReadAccessor
Modifier and Type | Class and Description |
---|---|
static class |
MvelConstraint.EvaluationContext |
static class |
MvelConstraint.MvelContextEntry |
static class |
MvelConstraint.PlainIndexEvaluator |
static class |
MvelConstraint.UnificationContextEntry |
Constraint.ConstraintType
Modifier and Type | Field and Description |
---|---|
protected MVELCompilationUnit |
compilationUnit |
protected ConditionEvaluator |
conditionEvaluator |
protected String |
expression |
static IndexEvaluator |
INDEX_EVALUATOR |
protected AtomicInteger |
invocationCounter |
protected boolean |
isDynamic |
protected boolean |
jitted |
protected static boolean |
TEST_JITTING |
Constructor and Description |
---|
MvelConstraint() |
MvelConstraint(Collection<String> packageNames,
String expression,
Declaration[] declarations,
EvaluatorWrapper[] operators,
MVELCompilationUnit compilationUnit,
IndexUtil.ConstraintType constraintType,
Declaration indexingDeclaration,
InternalReadAccessor extractor,
boolean isUnification) |
MvelConstraint(String packageName,
String expression,
Declaration[] declarations,
EvaluatorWrapper[] operators,
MVELCompilationUnit compilationUnit,
boolean isDynamic) |
MvelConstraint(String packageName,
String expression,
MVELCompilationUnit compilationUnit,
IndexUtil.ConstraintType constraintType,
FieldValue fieldValue,
InternalReadAccessor extractor,
EvaluatorWrapper[] operators) |
getType, setInUse, setType
finalize, getClass, notify, notifyAll, wait, wait, wait
getType
protected static final boolean TEST_JITTING
protected final transient AtomicInteger invocationCounter
protected transient volatile boolean jitted
protected String expression
protected boolean isDynamic
protected MVELCompilationUnit compilationUnit
protected transient volatile ConditionEvaluator conditionEvaluator
public static final IndexEvaluator INDEX_EVALUATOR
public MvelConstraint()
public MvelConstraint(String packageName, String expression, MVELCompilationUnit compilationUnit, IndexUtil.ConstraintType constraintType, FieldValue fieldValue, InternalReadAccessor extractor, EvaluatorWrapper[] operators)
public MvelConstraint(String packageName, String expression, Declaration[] declarations, EvaluatorWrapper[] operators, MVELCompilationUnit compilationUnit, boolean isDynamic)
public MvelConstraint(Collection<String> packageNames, String expression, Declaration[] declarations, EvaluatorWrapper[] operators, MVELCompilationUnit compilationUnit, IndexUtil.ConstraintType constraintType, Declaration indexingDeclaration, InternalReadAccessor extractor, boolean isUnification)
protected String getAccessedClass()
public void setReadAccessor(InternalReadAccessor readAccessor)
setReadAccessor
in interface AcceptsReadAccessor
public Collection<String> getPackageNames()
public void addPackageNames(Collection<String> otherPkgs)
public String getExpression()
public boolean isDynamic()
public boolean isUnification()
isUnification
in interface IndexableConstraint
public void unsetUnification()
unsetUnification
in interface IndexableConstraint
public boolean isIndexable(short nodeType)
isIndexable
in interface IndexableConstraint
public IndexUtil.ConstraintType getConstraintType()
getConstraintType
in interface IndexableConstraint
public FieldValue getField()
getField
in interface IndexableConstraint
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory)
isAllowed
in interface AlphaNodeFieldConstraint
public boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
isAllowedCachedLeft
in interface BetaNodeFieldConstraint
public boolean isAllowedCachedRight(Tuple tuple, ContextEntry context)
isAllowedCachedRight
in interface BetaNodeFieldConstraint
protected boolean evaluate(InternalFactHandle handle, InternalWorkingMemory workingMemory, Tuple tuple)
protected ConditionEvaluator createMvelConditionEvaluator(InternalWorkingMemory workingMemory)
protected ConditionEvaluator forceJitEvaluator(InternalFactHandle handle, InternalWorkingMemory workingMemory, Tuple tuple)
protected void jitEvaluator(InternalFactHandle handle, InternalWorkingMemory workingMemory, Tuple tuple)
public ContextEntry createContextEntry()
createContextEntry
in interface BetaNodeFieldConstraint
public AbstractHashTable.FieldIndex getFieldIndex()
getFieldIndex
in interface IndexableConstraint
public InternalReadAccessor getFieldExtractor()
getFieldExtractor
in interface IndexableConstraint
public Declaration[] getRequiredDeclarations()
Constraint
getRequiredDeclarations
in interface Constraint
public EvaluatorWrapper[] getOperators()
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Constraint
replaceDeclaration
in interface Constraint
public BitMask getListenedPropertyMask(Class modifiedClass, List<String> settableProperties)
getListenedPropertyMask
in interface Constraint
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MutableTypeConstraint
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class MutableTypeConstraint
IOException
ClassNotFoundException
public boolean isTemporal()
Constraint
isTemporal
in interface Constraint
public MvelConstraint cloneIfInUse()
AlphaNodeFieldConstraint
cloneIfInUse
in interface AlphaNodeFieldConstraint
cloneIfInUse
in interface BetaNodeFieldConstraint
cloneIfInUse
in class MutableTypeConstraint
public MvelConstraint clone()
Constraint
clone
in interface Constraint
clone
in class MutableTypeConstraint
public boolean equals(Object object, InternalKnowledgeBase kbase)
protected org.mvel2.ParserConfiguration getParserConfiguration(InternalWorkingMemory workingMemory)
protected MVELDialectRuntimeData getMVELDialectRuntimeData(InternalWorkingMemory workingMemory)
protected MVELDialectRuntimeData getMVELDialectRuntimeData(InternalKnowledgeBase kbase)
public void registerEvaluationContext(BuildContext buildContext)
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.