Interface Transformation
-
- All Superinterfaces:
Comparable<Transformation>
- All Known Implementing Classes:
AbstractTransformation
@Role public interface Transformation extends Comparable<Transformation>
Performs a transformation on a XDOM (i.e. a tree ofBlock
. This used for example for transforming Macro Blocks into other Blocks corresponding to the execution of the Macros. Another example of transformation would be looking for all words that have an entry on Wikipedia and adding links to them.- Since:
- 1.5M2
- Version:
- $Id: fcd7e17d5e546b73484ab9e2a4a415bfe8f8fc8d $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description int
getPriority()
The priority of execution relative to the other transformations.void
transform(Block block, TransformationContext context)
Transform the passed XDOM and modifies it.void
transform(XDOM dom, Syntax syntax)
Deprecated.since 2.4M1 usetransform(Block, TransformationContext)
instead-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getPriority
int getPriority()
The priority of execution relative to the other transformations. The lowest values have the highest priorities and execute first. For example a Transformation with a priority of 100 will execute before one with a priority of 500.- Returns:
- the execution priority
-
transform
@Deprecated void transform(XDOM dom, Syntax syntax) throws TransformationException
Deprecated.since 2.4M1 usetransform(Block, TransformationContext)
insteadTransform the passed XDOM and modifies it.- Parameters:
dom
- the AST representing the content in Blockssyntax
- the Syntax of the content- Throws:
TransformationException
- if the transformation fails for any reason
-
transform
void transform(Block block, TransformationContext context) throws TransformationException
Transform the passed XDOM and modifies it.- Parameters:
block
- the block to transform (can be anXDOM
)context
- the context of the transformation process (syntax, transformation id, etc)- Throws:
TransformationException
- if the transformation fails for any reason- Since:
- 2.4M1
-
-