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 IEtlContext
protected ExecutableBlock<Boolean>
protected Boolean
protected Collection<Object>
protected Parameter
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(IEtlVisitor visitor) boolean
appliesTo
(Object source, IEtlContext context, boolean asSuperRule) boolean
appliesTo
(Object source, IEtlContext context, boolean asSuperRule, boolean checkTypes) void
boolean
canTransformExcluded
(IEtlContext context) void
dispose()
protected void
executeSuperRulesAndBody
(Object source, Collection<Object> targets_, IEtlContext context) Collection<?>
getAllInstances
(IEtlContext context) getBody()
getGuard()
getSuperRulesAst
(AST cst) boolean
hasTransformed
(Object source) boolean
isLazy
(IEolContext context) boolean
isPrimary
(IEtlContext context) void
setBody
(ExecutableBlock<Void> body) void
setGuard
(ExecutableBlock<Boolean> guard) void
setSourceParameter
(Parameter sourceParameter) boolean
shouldBeTransformed
(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) void
transformAll
(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, 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
-
Field Details
-
sourceParameter
-
targetParameters
-
guard
-
body
-
context
-
isPrimary
-
rejected
-
transformedElements
-
-
Constructor Details
-
TransformationRule
public TransformationRule()
-
-
Method Details
-
getSuperRulesAst
- Specified by:
getSuperRulesAst
in classExtensibleNamedRule
-
getSourceParameter
-
setSourceParameter
-
getBody
-
setBody
-
getGuard
-
setGuard
-
getTargetParameters
-
build
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classExtensibleNamedRule
-
isLazy
- Overrides:
isLazy
in 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()
-