public class MatchRule extends ExtensibleNamedRule
| Modifier and Type | Field and Description |
|---|---|
protected ExecutableBlock<Boolean> |
compareBlock |
protected ExecutableBlock<Void> |
doBlock |
protected ExecutableBlock<Boolean> |
guardBlock |
protected Parameter |
leftParameter |
protected Parameter |
rightParameter |
allSuperRules, isAbstract, isGreedy, isLazy, ofKindCache, ofTypeCache, superRules, superRulesIdentifiersnameExpressionannotationBlock| Constructor and Description |
|---|
MatchRule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appliesTo(Object left,
Object right,
IEclContext context,
boolean ofTypeOnly) |
void |
build(org.eclipse.epsilon.common.parse.AST cst,
org.eclipse.epsilon.common.module.IModule module) |
Collection<?> |
getLeftInstances(IEclContext context,
boolean ofTypeOnly) |
Collection<?> |
getRightInstances(IEclContext context,
boolean ofTypeOnly) |
org.eclipse.epsilon.common.parse.AST |
getSuperRulesAst(org.eclipse.epsilon.common.parse.AST cst) |
Match |
match(Object left,
Object right,
IEclContext context,
EolMap<?,?> matchInfo,
boolean forcedMatch)
Matches left against right
|
Match |
matchPair(IEclContext context,
boolean ofTypeOnly,
Object leftInstance,
Object rightInstance) |
String |
toString() |
calculateSuperRules, calculateSuperRules, getAllInstances, getAllOfKind, getAllOfType, getAllSuperRules, getRuleByName, getSuperRules, isAbstract, isGreedy, isLazyequals, getName, getNameAst, getNameExpression, hashCode, setNameExpressiongetAnnotation, getAnnotationBlock, getAnnotations, getAnnotationsValues, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, hasAnnotation, setAnnotationBlockprotected ExecutableBlock<Boolean> compareBlock
protected ExecutableBlock<Boolean> guardBlock
protected ExecutableBlock<Void> doBlock
protected Parameter leftParameter
protected Parameter rightParameter
public org.eclipse.epsilon.common.parse.AST getSuperRulesAst(org.eclipse.epsilon.common.parse.AST cst)
getSuperRulesAst in class ExtensibleNamedRulepublic void build(org.eclipse.epsilon.common.parse.AST cst,
org.eclipse.epsilon.common.module.IModule module)
build in interface org.eclipse.epsilon.common.module.ModuleElementbuild in class ExtensibleNamedRulepublic boolean appliesTo(Object left, Object right, IEclContext context, boolean ofTypeOnly) throws EolRuntimeException
EolRuntimeExceptionpublic Collection<?> getLeftInstances(IEclContext context, boolean ofTypeOnly) throws EolRuntimeException
EolRuntimeExceptionpublic Collection<?> getRightInstances(IEclContext context, boolean ofTypeOnly) throws EolRuntimeException
EolRuntimeExceptionpublic Match matchPair(IEclContext context, boolean ofTypeOnly, Object leftInstance, Object rightInstance) throws EolRuntimeException
EolRuntimeExceptionpublic Match match(Object left, Object right, IEclContext context, EolMap<?,?> matchInfo, boolean forcedMatch) throws EolRuntimeException
left - The left objectright - The right objectcontext - The context in which the ECL program is runningasSuperRule - Shows if the rule is executed as a super-rule of another ruleforcedMatch - Whether to add the match to the trace (?)EolRuntimeExceptionCopyright © 2020. All rights reserved.