Package org.eclipse.epsilon.egl.dom
Class GenerationRule
-
- All Implemented Interfaces:
ModuleElement,IExecutableModuleElement,IExecutableModuleElementParameter
- Direct Known Subclasses:
LazyEgxModule.LazyGenerationRule
public class GenerationRule extends ExtensibleNamedRule implements IExecutableModuleElementParameter, IExecutableModuleElement
-
-
Field Summary
Fields Modifier and Type Field Description protected ExecutableBlock<Boolean>appendBlockprotected ExecutableBlock<Collection<?>>domainBlockprotected ExecutableBlock<Boolean>guardBlockprotected ExecutableBlock<Boolean>mergeBlockprotected ExecutableBlock<Boolean>overwriteBlockprotected ExecutableBlock<EolMap<String,?>>parametersBlockprotected ExecutableBlock<Boolean>patchBlockprotected ExecutableBlock<?>postBlockprotected ExecutableBlock<?>preBlockprotected ParametersourceParameterprotected ExecutableBlock<String>targetBlockprotected ExecutableBlock<String>templateBlock-
Fields inherited from class org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
allSuperRules, isAbstract, isGreedy, isLazy, isParallel, ofKindCache, ofTypeCache, superRules, 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 GenerationRule()
-
Method Summary
-
Methods inherited from class org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
calculateSuperRules, calculateSuperRules, getAllInstances, getAllOfKind, getAllOfType, getAllSuperRules, getRuleByName, getSuperRules, isAbstract, isGreedy, isLazy, isParallel
-
Methods inherited from class org.eclipse.epsilon.erl.dom.NamedRule
equals, getName, getNameAst, getNameExpression, hashCode
-
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
sourceParameter
protected Parameter sourceParameter
-
domainBlock
protected ExecutableBlock<Collection<?>> domainBlock
-
targetBlock
protected ExecutableBlock<String> targetBlock
-
templateBlock
protected ExecutableBlock<String> templateBlock
-
guardBlock
protected ExecutableBlock<Boolean> guardBlock
-
overwriteBlock
protected ExecutableBlock<Boolean> overwriteBlock
-
mergeBlock
protected ExecutableBlock<Boolean> mergeBlock
-
appendBlock
protected ExecutableBlock<Boolean> appendBlock
-
patchBlock
protected ExecutableBlock<Boolean> patchBlock
-
preBlock
protected ExecutableBlock<?> preBlock
-
postBlock
protected ExecutableBlock<?> postBlock
-
parametersBlock
protected ExecutableBlock<EolMap<String,?>> parametersBlock
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
buildin interfaceModuleElement- Overrides:
buildin classExtensibleNamedRule
-
getAllElements
public Collection<?> getAllElements(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
public Object execute(IEolContext context_, Object element) throws EolRuntimeException
- Specified by:
executein interfaceIExecutableModuleElementParameter- Throws:
EolRuntimeException
-
execute
public Object execute(IEolContext context) throws EolRuntimeException
- Specified by:
executein interfaceIExecutableModuleElement- Throws:
EolRuntimeException
-
getOwningModelForType
public IModel getOwningModelForType(IEolContext context) throws EolRuntimeException
Gets the model which the "transform" parameter type expression belongs to.- Parameters:
context-- Returns:
- The model for the parameter.
- Throws:
EolRuntimeException- Since:
- 1.6
-
getSuperRulesAst
public AST getSuperRulesAst(AST cst)
- Specified by:
getSuperRulesAstin classExtensibleNamedRule
-
accept
public void accept(IEgxVisitor visitor)
-
getTransformSource
public Parameter getTransformSource()
Gets the parameter bound to the "transform" part, ifhasTransformSource()== true.- Returns:
- The part following "transform", or
nullif absent. - Since:
- 2.3
-
hasTransformSource
public boolean hasTransformSource()
Used to determine whether this rule operates over a collection of model elements.- Returns:
trueif the rule has a "transform" part.- Since:
- 2.3
-
getDomainBlock
public ExecutableBlock<? extends Collection<?>> getDomainBlock()
- Returns:
- Since:
- 2.3
-
getTargetBlock
public ExecutableBlock<String> getTargetBlock()
- Returns:
- Since:
- 2.3
-
getTemplateBlock
public ExecutableBlock<String> getTemplateBlock()
- Returns:
- Since:
- 2.3
-
getGuardBlock
public ExecutableBlock<Boolean> getGuardBlock()
- Returns:
- Since:
- 2.3
-
getOverwriteBlock
public ExecutableBlock<Boolean> getOverwriteBlock()
- Returns:
- Since:
- 2.3
-
getMergeBlock
public ExecutableBlock<Boolean> getMergeBlock()
- Returns:
- Since:
- 2.3
-
getPreBlock
public ExecutableBlock<?> getPreBlock()
- Returns:
- Since:
- 2.3
-
getPostBlock
public ExecutableBlock<?> getPostBlock()
- Returns:
- Since:
- 2.3
-
getParametersBlock
public ExecutableBlock<EolMap<String,?>> getParametersBlock()
- Returns:
- Since:
- 2.3
-
-