Package org.eclipse.epsilon.erl.dom
Class ExtensibleNamedRule
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
-
- org.eclipse.epsilon.erl.dom.NamedRule
-
- org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
-
- All Implemented Interfaces:
ModuleElement
- Direct Known Subclasses:
GenerationRule
,MatchRule
,MergeRule
,TransformationRule
public abstract class ExtensibleNamedRule extends NamedRule
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ExtensibleNamedRule>
allSuperRules
protected Boolean
isAbstract
protected Boolean
isGreedy
protected Boolean
isLazy
protected Boolean
isParallel
protected Map<Parameter,Collection<?>>
ofKindCache
protected Map<Parameter,Collection<?>>
ofTypeCache
protected List<ExtensibleNamedRule>
superRules
protected List<NameExpression>
superRulesIdentifiers
-
Fields inherited from class org.eclipse.epsilon.erl.dom.NamedRule
nameExpression
-
Fields inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
annotationBlock
-
-
Constructor Summary
Constructors Constructor Description ExtensibleNamedRule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
build(AST cst, IModule module)
void
calculateSuperRules(List<? extends ExtensibleNamedRule> allRules)
protected void
calculateSuperRules(ExtensibleNamedRule rule, List<? extends ExtensibleNamedRule> allRules, List<ExtensibleNamedRule> collectedRules, boolean recursive)
Collection<?>
getAllInstances(Parameter parameter, IEolContext context, boolean ofTypeOnly)
Collection<?>
getAllOfKind(Parameter parameter, IEolContext context)
Collection<?>
getAllOfType(Parameter parameter, IEolContext context)
List<ExtensibleNamedRule>
getAllSuperRules()
protected NamedRule
getRuleByName(List<? extends NamedRule> rules, String name)
List<ExtensibleNamedRule>
getSuperRules()
abstract AST
getSuperRulesAst(AST cst)
boolean
isAbstract(IEolContext context)
boolean
isGreedy(IEolContext context)
boolean
isLazy(IEolContext context)
boolean
isParallel(IEolContext context)
-
Methods inherited from class org.eclipse.epsilon.erl.dom.NamedRule
equals, getName, getNameAst, getNameExpression, hashCode, toString
-
Methods inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
accept, getAnnotation, getAnnotationBlock, getAnnotations, getAnnotationsValues, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, hasAnnotation, setAnnotationBlock
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
superRulesIdentifiers
protected List<NameExpression> superRulesIdentifiers
-
superRules
protected List<ExtensibleNamedRule> superRules
-
allSuperRules
protected List<ExtensibleNamedRule> allSuperRules
-
isGreedy
protected Boolean isGreedy
-
isAbstract
protected Boolean isAbstract
-
isLazy
protected Boolean isLazy
-
isParallel
protected Boolean isParallel
-
ofTypeCache
protected Map<Parameter,Collection<?>> ofTypeCache
-
ofKindCache
protected Map<Parameter,Collection<?>> ofKindCache
-
-
Method Detail
-
getAllOfKind
public Collection<?> getAllOfKind(Parameter parameter, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getAllOfType
public Collection<?> getAllOfType(Parameter parameter, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getAllInstances
public Collection<?> getAllInstances(Parameter parameter, IEolContext context, boolean ofTypeOnly) throws EolRuntimeException
- Throws:
EolRuntimeException
-
isParallel
public boolean isParallel(IEolContext context) throws EolRuntimeException
- Parameters:
context
-- Returns:
- Throws:
EolRuntimeException
- Since:
- 2.3
-
isGreedy
public boolean isGreedy(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
isAbstract
public boolean isAbstract(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
isLazy
public boolean isLazy(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
calculateSuperRules
public void calculateSuperRules(List<? extends ExtensibleNamedRule> allRules) throws ErlRuleNotFoundException, ErlCircularRuleInheritanceException
-
calculateSuperRules
protected void calculateSuperRules(ExtensibleNamedRule rule, List<? extends ExtensibleNamedRule> allRules, List<ExtensibleNamedRule> collectedRules, boolean recursive) throws ErlRuleNotFoundException, ErlCircularRuleInheritanceException
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classNamedRule
-
getAllSuperRules
public List<ExtensibleNamedRule> getAllSuperRules()
-
getSuperRules
public List<ExtensibleNamedRule> getSuperRules()
-
-