SourceURI (groovy 3.0.9 API)

Package: groovy.transform

## [Java] Annotation Type SourceURI

- groovy.transform.SourceURI

-     @Documented
      @Retention(RetentionPolicy.SOURCE)
      @Target({ElementType.LOCAL_VARIABLE, ElementType.FIELD})
      @GroovyASTTransformationClass("org.codehaus.groovy.transform.SourceURIASTTransformation")
      public @interface SourceURI

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

  The type of the variable annotated with `@SourceURI` must be assignment compatible with 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

- - ### Element Summary

    Optional Element Summary
    Type | Name and Description
    --- | ---
    `boolean` | `allowRelative` Default: false

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Element Detail

    - #### public boolean allowRelative

      Default:
        false