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 java.util.List<ExtensibleNamedRule>
allSuperRules
protected java.lang.Boolean
isAbstract
protected java.lang.Boolean
isGreedy
protected java.lang.Boolean
isLazy
protected java.util.Map<Parameter,java.util.Collection<?>>
ofKindCache
protected java.util.Map<Parameter,java.util.Collection<?>>
ofTypeCache
protected java.util.List<ExtensibleNamedRule>
superRules
protected java.util.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(java.util.List<? extends ExtensibleNamedRule> allRules)
protected void
calculateSuperRules(ExtensibleNamedRule rule, java.util.List<? extends ExtensibleNamedRule> allRules, java.util.List<ExtensibleNamedRule> collectedRules, boolean recursive)
java.util.Collection<?>
getAllInstances(Parameter parameter, IEolContext context, boolean ofTypeOnly)
java.util.Collection<?>
getAllOfKind(Parameter parameter, IEolContext context)
java.util.Collection<?>
getAllOfType(Parameter parameter, IEolContext context)
java.util.List<ExtensibleNamedRule>
getAllSuperRules()
protected NamedRule
getRuleByName(java.util.List<? extends NamedRule> rules, java.lang.String name)
java.util.List<ExtensibleNamedRule>
getSuperRules()
abstract AST
getSuperRulesAst(AST cst)
boolean
isAbstract(IEolContext context)
boolean
isGreedy(IEolContext context)
boolean
isLazy(IEolContext context)
-
Methods inherited from class org.eclipse.epsilon.erl.dom.NamedRule
equals, getName, getNameAst, getNameExpression, hashCode, setNameExpression, toString
-
Methods inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
getAnnotation, getAnnotationBlock, getAnnotations, getAnnotationsValues, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, hasAnnotation, setAnnotationBlock
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
getChildren, getComments, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
superRulesIdentifiers
protected java.util.List<NameExpression> superRulesIdentifiers
-
superRules
protected java.util.List<ExtensibleNamedRule> superRules
-
allSuperRules
protected java.util.List<ExtensibleNamedRule> allSuperRules
-
isGreedy
protected java.lang.Boolean isGreedy
-
isAbstract
protected java.lang.Boolean isAbstract
-
isLazy
protected java.lang.Boolean isLazy
-
ofTypeCache
protected java.util.Map<Parameter,java.util.Collection<?>> ofTypeCache
-
ofKindCache
protected java.util.Map<Parameter,java.util.Collection<?>> ofKindCache
-
-
Method Detail
-
getAllOfKind
public java.util.Collection<?> getAllOfKind(Parameter parameter, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getAllOfType
public java.util.Collection<?> getAllOfType(Parameter parameter, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getAllInstances
public java.util.Collection<?> getAllInstances(Parameter parameter, IEolContext context, boolean ofTypeOnly) throws EolRuntimeException
- Throws:
EolRuntimeException
-
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(java.util.List<? extends ExtensibleNamedRule> allRules) throws ErlRuleNotFoundException, ErlCircularRuleInheritanceException
-
calculateSuperRules
protected void calculateSuperRules(ExtensibleNamedRule rule, java.util.List<? extends ExtensibleNamedRule> allRules, java.util.List<ExtensibleNamedRule> collectedRules, boolean recursive) throws ErlRuleNotFoundException, ErlCircularRuleInheritanceException
-
getRuleByName
protected NamedRule getRuleByName(java.util.List<? extends NamedRule> rules, java.lang.String name)
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classNamedRule
-
getAllSuperRules
public java.util.List<ExtensibleNamedRule> getAllSuperRules()
-
getSuperRules
public java.util.List<ExtensibleNamedRule> getSuperRules()
-
-