@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS)
public class SourceURIASTTransformation
extends AbstractASTTransformation
Handles transformation for the
| Fields inherited from class | Fields |
|---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected URI |
getSourceURI(AnnotationNode node)Returns the URI of the current source, or null when the source has none.
|
|
public void |
visit(ASTNode[] nodes, SourceUnit source) |
Returns the URI of the current source, or null when the source has none.
A relative URI is returned unchanged when the annotation member
allowRelative is the constant true. Otherwise a relative URI
is replaced with uri.resolve(new File(".").toURI()). That argument is
an absolute file URI of the working directory, so URI.resolve
returns the working-directory URI and the original relative path is not appended.
node - the @SourceURI annotation, read only for allowRelativenull