Top Description Methods
groovy.transform

public @Interface SourceURI

extends Annotation
Annotations
@Documented
@Retention:SOURCE
@Target:LOCAL_VARIABLE, FIELD
@GroovyASTTransformationClass:SourceURIASTTransformation
Imports
org.codehaus.groovy.transform.GroovyASTTransformationClass, java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Variable annotation used for getting the URI of the current script.

The type of the variable annotated with @SourceURI must be assignment compatible with java.net.URI. It will be used to hold a URI object that references the source for the current script.

By default the URI will be made absolute (which is to say it will have an authority) in the case where a relative path was used for the source of the script. If you want to leave relative URIs as relative, then set allowRelative to true.

Example usage:
@groovy.transform.SourceURI def sourceURI

assert sourceURI instanceof java.net.URI
Since
2.3.0

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

allowRelativeback to summary
public boolean allowRelative()