Interface IClassAnnotation
-
- All Known Implementing Classes:
GeneratedClassAnnotation
,SingletonClassAnnotation
,SuppressWarningsAnnotation
public interface IClassAnnotation
Class annotations can be added to theXtextGenerator
workflow component in order to configure specific Java annotations to be added to each generated class.
Make sure that you implementObject.equals(Object)
andObject.hashCode()
to fulfill following contract- If the underlying Annotation is
Repeatable
then the methods should behave like inObject
. - If the underlying Annotation is NOT
Repeatable
thenObject.equals(Object)
should return true for all instances andObject.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, ornull
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, ornull
if no import is required.
-
-