public class UtilityRemove extends ClawBlockTransformation
_clawEnd, _clawStart
Constructor and Description |
---|
UtilityRemove(ClawPragma startDirective,
ClawPragma endDirective)
Constructs a new UtilityRemove triggered from a specific pragma.
|
Modifier and Type | Method and Description |
---|---|
boolean |
analyze(XcodeProgram xcodeml,
Translator translator)
Check whether the transformation can be applied or not.
|
boolean |
canBeTransformedWith(XcodeProgram xcodeml,
Transformation transformation)
Check whether the current transformation can be transformed together with
the given transformation.
|
void |
transform(XcodeProgram xcodeml,
Translator translator,
Transformation transformation)
Delete the corresponding elements.
|
removePragma
getEndDirective
abortOnFailedAnalysis, getDirective, getStartLine, isTransformed, setStartLine, transformed
public UtilityRemove(ClawPragma startDirective, ClawPragma endDirective)
startDirective
- The directive that triggered the remove $
transformation.endDirective
- The end directive that close the structured block.
Can be null if the start directive is used before a
do statement or an if statement.public boolean analyze(XcodeProgram xcodeml, Translator translator)
analyze
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.translator
- The translator used to applied the transformations.public void transform(XcodeProgram xcodeml, Translator translator, Transformation transformation) throws IllegalTransformationException
transform
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.translator
- The translator used to applied the transformations.transformation
- Not used for independent transformation.IllegalTransformationException
- If transformation cannot be applied.public boolean canBeTransformedWith(XcodeProgram xcodeml, Transformation transformation)
Transformation
canBeTransformedWith
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.transformation
- The other transformation part of the dependent transformation.Transformation.canBeTransformedWith(XcodeProgram, Transformation)