Package org.eclipse.epsilon.etl.dom
Class TransformationRule
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
org.eclipse.epsilon.etl.dom.TransformationRule
- All Implemented Interfaces:
ModuleElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExecutableBlock<Void>protected IEtlContextprotected ExecutableBlock<Boolean>protected Booleanprotected Collection<Object>protected Parameterprotected List<Optional<Expression>>Fields inherited from class org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
allSuperRules, isAbstract, isGreedy, isLazy, isParallel, ofKindCache, ofTypeCache, superRules, superRulesIdentifiersFields inherited from class org.eclipse.epsilon.erl.dom.NamedRule
nameExpressionFields inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
annotationBlock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IEtlVisitor visitor) booleanappliesTo(Object source, IEtlContext context, boolean asSuperRule) booleanappliesTo(Object source, IEtlContext context, boolean asSuperRule, boolean checkTypes) voidbooleancanTransformExcluded(IEtlContext context) voiddispose()protected voidexecuteSuperRulesAndBody(Object source, Collection<Object> targets_, IEtlContext context) Collection<?>getAllInstances(IEtlContext context) getBody()getGuard()getSuperRulesAst(AST cst) booleanhasTransformed(Object source) booleanisLazy(IEolContext context) booleanisPrimary(IEtlContext context) voidsetBody(ExecutableBlock<Void> body) voidsetGuard(ExecutableBlock<Boolean> guard) voidsetSourceParameter(Parameter sourceParameter) booleanshouldBeTransformed(Object instance, Collection<Object> excluded, IEtlContext context, boolean overrideLazy) toString()Collection<?>transform(Object source, Collection<Object> targets, IEtlContext context) Collection<?>transform(Object source, IEtlContext context) voidtransformAll(IEtlContext context, Collection<Object> excluded, boolean includeLazy) Methods inherited from class org.eclipse.epsilon.erl.dom.ExtensibleNamedRule
calculateSuperRules, calculateSuperRules, getAllInstances, getAllOfKind, getAllOfType, getAllSuperRules, getRuleByName, getSuperRules, isAbstract, isGreedy, isParallelMethods inherited from class org.eclipse.epsilon.erl.dom.NamedRule
equals, getName, getNameAst, getNameExpression, hashCodeMethods inherited from class org.eclipse.epsilon.eol.dom.AnnotatableModuleElement
accept, getAnnotation, getAnnotationBlock, getAnnotations, getAnnotationsValues, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, getBooleanAnnotationValue, hasAnnotation, setAnnotationBlockMethods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
Field Details
-
sourceParameter
-
targetParameters
-
targetParameterInitializers
-
guard
-
body
-
context
-
isPrimary
-
rejected
-
transformedElements
-
-
Constructor Details
-
TransformationRule
public TransformationRule()
-
-
Method Details
-
getSuperRulesAst
- Specified by:
getSuperRulesAstin classExtensibleNamedRule
-
getSourceParameter
-
setSourceParameter
-
getBody
-
setBody
-
getGuard
-
setGuard
-
getTargetParameters
-
getTargetParameterInitializers
-
build
- Specified by:
buildin interfaceModuleElement- Overrides:
buildin classExtensibleNamedRule
-
isLazy
- Overrides:
isLazyin classExtensibleNamedRule- Throws:
EolRuntimeException
-
hasTransformed
-
appliesTo
public boolean appliesTo(Object source, IEtlContext context, boolean asSuperRule) throws EolRuntimeException - Throws:
EolRuntimeException
-
appliesTo
public boolean appliesTo(Object source, IEtlContext context, boolean asSuperRule, boolean checkTypes) throws EolRuntimeException - Throws:
EolRuntimeException
-
getAllInstances
- Parameters:
context-- Returns:
- Throws:
EolRuntimeException- Since:
- 1.6
-
transformAll
public void transformAll(IEtlContext context, Collection<Object> excluded, boolean includeLazy) throws EolRuntimeException - Parameters:
context-excluded-includeLazy- Whether to transform lazy rules.- Throws:
EolRuntimeException- Since:
- 1.6
-
transform
public Collection<?> transform(Object source, Collection<Object> targets, IEtlContext context) throws EolRuntimeException - Throws:
EolRuntimeException
-
transform
- Throws:
EolRuntimeException
-
executeSuperRulesAndBody
protected void executeSuperRulesAndBody(Object source, Collection<Object> targets_, IEtlContext context) throws EolRuntimeException - Throws:
EolRuntimeException
-
toString
-
isPrimary
- Throws:
EolRuntimeException
-
canTransformExcluded
- Throws:
EolRuntimeException
-
shouldBeTransformed
public boolean shouldBeTransformed(Object instance, Collection<Object> excluded, IEtlContext context, boolean overrideLazy) throws EolRuntimeException - Throws:
EolRuntimeException
-
accept
-
dispose
public void dispose()
-