Interface IClassAnnotation

  • All Known Implementing Classes:
    GeneratedClassAnnotation, SingletonClassAnnotation, SuppressWarningsAnnotation

    public interface IClassAnnotation
    Class annotations can be added to the XtextGenerator workflow component in order to configure specific Java annotations to be added to each generated class.

    Make sure that you implement Object.equals(Object) and Object.hashCode() to fulfill following contract
    • If the underlying Annotation is Repeatable then the methods should behave like in Object.
    • If the underlying Annotation is NOT Repeatable then Object.equals(Object) should return true for all instances and Object.hashCode() should return the same value for all instances
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean appliesTo​(JavaFileAccess javaFile)
      Determine whether this annotation should be applied to the given Java file.
      java.lang.CharSequence generate()
      Convert the class annotation to a string suitable for use in Java code generation.
      TypeReference getAnnotationImport()
      Return the qualified name of the annotation interface for use in import declarations, or null if no import is required.
    • Method Detail

      • generate

        java.lang.CharSequence generate()
        Convert the class annotation to a string suitable for use in Java code generation.
      • appliesTo

        boolean appliesTo​(JavaFileAccess javaFile)
        Determine whether this annotation should be applied to the given Java file.
      • getAnnotationImport

        TypeReference getAnnotationImport()
        Return the qualified name of the annotation interface for use in import declarations, or null if no import is required.