Package org.eclipse.epsilon.egl.dom
Class GenerationRule
- java.lang.Object
-
- 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<java.util.Collection<?>>
domainBlock
protected ExecutableBlock<java.lang.Boolean>
guardBlock
protected ExecutableBlock<java.lang.Boolean>
mergeBlock
protected ExecutableBlock<java.lang.Boolean>
overwriteBlock
protected ExecutableBlock<EolMap<java.lang.String,?>>
parametersBlock
protected ExecutableBlock<?>
postBlock
protected ExecutableBlock<?>
preBlock
protected Parameter
sourceParameter
protected ExecutableBlock<java.lang.String>
targetBlock
protected ExecutableBlock<java.lang.String>
templateBlock
-
Fields inherited from class org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
allSuperRules, isAbstract, isGreedy, isLazy, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
build(AST cst, IModule module)
java.lang.Object
execute(IEolContext context)
java.lang.Object
execute(IEolContext context_, java.lang.Object element)
java.util.Collection<?>
getAllElements(IEolContext context)
IModel
getOwningModelForType(IEolContext context)
Gets the model which the "transform" parameter type expression belongs to.AST
getSuperRulesAst(AST cst)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
calculateSuperRules, calculateSuperRules, getAllInstances, getAllOfKind, getAllOfType, getAllSuperRules, getRuleByName, getSuperRules, isAbstract, isGreedy, isLazy
-
Methods inherited from class org.eclipse.epsilon.erl.dom.NamedRule
equals, getName, getNameAst, getNameExpression, hashCode, setNameExpression
-
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
-
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, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
sourceParameter
protected Parameter sourceParameter
-
domainBlock
protected ExecutableBlock<java.util.Collection<?>> domainBlock
-
targetBlock
protected ExecutableBlock<java.lang.String> targetBlock
-
templateBlock
protected ExecutableBlock<java.lang.String> templateBlock
-
guardBlock
protected ExecutableBlock<java.lang.Boolean> guardBlock
-
overwriteBlock
protected ExecutableBlock<java.lang.Boolean> overwriteBlock
-
mergeBlock
protected ExecutableBlock<java.lang.Boolean> mergeBlock
-
preBlock
protected ExecutableBlock<?> preBlock
-
postBlock
protected ExecutableBlock<?> postBlock
-
parametersBlock
protected ExecutableBlock<EolMap<java.lang.String,?>> parametersBlock
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classExtensibleNamedRule
-
getAllElements
public java.util.Collection<?> getAllElements(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
public java.lang.Object execute(IEolContext context_, java.lang.Object element) throws EolRuntimeException
- Specified by:
execute
in interfaceIExecutableModuleElementParameter
- Throws:
EolRuntimeException
-
execute
public java.lang.Object execute(IEolContext context) throws EolRuntimeException
- Specified by:
execute
in 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:
getSuperRulesAst
in classExtensibleNamedRule
-
-