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,
MVELCompilationUnit compilationUnit,
IndexUtil.ConstraintType constraintType,
Declaration indexingDeclaration,
InternalReadAccessor extractor,
boolean isUnification) |
MvelConstraint(String packageName,
String expression,
Declaration[] declarations,
MVELCompilationUnit compilationUnit,
boolean isDynamic) |
MvelConstraint(String packageName,
String expression,
MVELCompilationUnit compilationUnit,
IndexUtil.ConstraintType constraintType,
FieldValue fieldValue,
InternalReadAccessor extractor) |
getType, setInUse, setTypefinalize, getClass, notify, notifyAll, wait, wait, waitgetTypeprotected static final boolean TEST_JITTING
protected final transient AtomicInteger invocationCounter
protected transient 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)
public MvelConstraint(String packageName, String expression, Declaration[] declarations, MVELCompilationUnit compilationUnit, boolean isDynamic)
public MvelConstraint(Collection<String> packageNames, String expression, Declaration[] declarations, MVELCompilationUnit compilationUnit, IndexUtil.ConstraintType constraintType, Declaration indexingDeclaration, InternalReadAccessor extractor, boolean isUnification)
protected String getAccessedClass()
public void setReadAccessor(InternalReadAccessor readAccessor)
setReadAccessor in interface AcceptsReadAccessorpublic Collection<String> getPackageNames()
public void addPackageNames(Collection<String> otherPkgs)
public String getExpression()
public boolean isDynamic()
public boolean isUnification()
isUnification in interface IndexableConstraintpublic void unsetUnification()
public boolean isIndexable(short nodeType)
isIndexable in interface IndexableConstraintpublic IndexUtil.ConstraintType getConstraintType()
getConstraintType in interface IndexableConstraintpublic FieldValue getField()
getField in interface IndexableConstraintpublic boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory, ContextEntry context)
isAllowed in interface AlphaNodeFieldConstraintpublic boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
isAllowedCachedLeft in interface BetaNodeFieldConstraintpublic boolean isAllowedCachedRight(LeftTuple tuple, ContextEntry context)
isAllowedCachedRight in interface BetaNodeFieldConstraintprotected boolean evaluate(InternalFactHandle handle, InternalWorkingMemory workingMemory, LeftTuple leftTuple)
protected void createMvelConditionEvaluator(InternalWorkingMemory workingMemory)
protected boolean forceJitEvaluator(InternalFactHandle handle, InternalWorkingMemory workingMemory, LeftTuple leftTuple)
protected void jitEvaluator(InternalFactHandle handle, InternalWorkingMemory workingMemory, LeftTuple leftTuple)
public ContextEntry createContextEntry()
createContextEntry in interface AlphaNodeFieldConstraintcreateContextEntry in interface BetaNodeFieldConstraintpublic AbstractHashTable.FieldIndex getFieldIndex()
getFieldIndex in interface IndexableConstraintpublic InternalReadAccessor getFieldExtractor()
getFieldExtractor in interface IndexableConstraintpublic Declaration[] getRequiredDeclarations()
ConstraintgetRequiredDeclarations in interface Constraintpublic Declaration getIndexingDeclaration()
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
ConstraintreplaceDeclaration in interface Constraintpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class MutableTypeConstraintIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class MutableTypeConstraintIOExceptionClassNotFoundExceptionpublic boolean isTemporal()
ConstraintisTemporal in interface Constraintpublic MvelConstraint cloneIfInUse()
AlphaNodeFieldConstraintcloneIfInUse in interface AlphaNodeFieldConstraintcloneIfInUse in interface BetaNodeFieldConstraintcloneIfInUse in class MutableTypeConstraintpublic MvelConstraint clone()
Constraintclone in interface Constraintclone in class MutableTypeConstraintpublic 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–2015 JBoss by Red Hat. All rights reserved.