Annotation Type SourcePosition


  • @Retention(SOURCE)
    public @interface SourcePosition
    This annotation is used for an ITypeManifold to map a generated Java feature to the corresponding resource file location. If possible, include this annotation for all generated methods and fields, as this annotation is vital for most of the features in the IntelliJ plugin and other IDE tooling.

    Note the constant fields mirror the annotation's method names and are used to access the values of the annotation during compile-time. They exist primarily as a stopgap until Java provides method literals to safely access method names...

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String feature
      The name of the feature
      String url
      The location of the resource containing the feature "declaration"
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String kind
      What kind of feature is this according to the resource's schema taxonomy?
      int length
      The length of the feature declaration
      int line
      The line where the feature begins.
      int offset
      The offset of the feature declaration from the beginning of the file
      String type
      The qualified type of the feature
    • Field Detail

      • DEFAULT_KIND

        static final String DEFAULT_KIND
      • OFFSET

        static final String OFFSET
      • LENGTH

        static final String LENGTH
      • FEATURE

        static final String FEATURE
    • Element Detail

      • url

        String url
        The location of the resource containing the feature "declaration"
      • feature

        String feature
        The name of the feature
      • offset

        int offset
        The offset of the feature declaration from the beginning of the file
        Default:
        -1
      • length

        int length
        The length of the feature declaration
        Default:
        -1
      • type

        String type
        The qualified type of the feature
        Default:
        ""
      • kind

        String kind
        What kind of feature is this according to the resource's schema taxonomy? Optional.
        Default:
        "feature"
      • line

        int line
        The line where the feature begins. Optional.
        Default:
        -1