Module com.speedment.common.codegen
Interface HasAnnotationUsage<T extends HasAnnotationUsage<T>>
-
- Type Parameters:
T- The extending type
- All Known Subinterfaces:
Annotation,Class,ClassOrInterface<T>,Constructor,Enum,EnumConstant,Field,Interface,InterfaceField,InterfaceMethod,Method
public interface HasAnnotationUsage<T extends HasAnnotationUsage<T>>A trait for models that containsAnnotationUsagecomponents.- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tadd(AnnotationUsage annotation)Adds the specifiedAnnotationUsageto this model.default Tannotate(AnnotationUsage annotation)Adds the specifiedAnnotationUsageto this model.default Tannotate(Type annotation)Creates anAnnotationUsagewith the specifiedTypeand adds it to this model.default Tannotate(Type annotation, String textValue)Creates anAnnotationUsagewith the specifiedTypeand adds it to this model.List<AnnotationUsage>getAnnotations()Returns a list of all the annotation usages in this model.
-
-
-
Method Detail
-
add
default T add(AnnotationUsage annotation)
Adds the specifiedAnnotationUsageto this model.- Parameters:
annotation- the new child- Returns:
- a reference to this
-
annotate
default T annotate(AnnotationUsage annotation)
Adds the specifiedAnnotationUsageto this model. This is a synonym foradd(AnnotationUsage).- Parameters:
annotation- the new annotation usage- Returns:
- a reference to this
- Since:
- 2.5
-
annotate
default T annotate(Type annotation)
Creates anAnnotationUsagewith the specifiedTypeand adds it to this model.- Parameters:
annotation- the new annotation usage- Returns:
- a reference to this
- Since:
- 2.5
-
annotate
default T annotate(Type annotation, String textValue)
Creates anAnnotationUsagewith the specifiedTypeand adds it to this model. This method will also set thevalue()of the annotation totextValue.- Parameters:
annotation- the new annotation usagetextValue- the value of the text for this annotation- Returns:
- a reference to this
- Since:
- 2.5
-
getAnnotations
List<AnnotationUsage> getAnnotations()
Returns a list of all the annotation usages in this model.The list returned must be mutable for changes!
- Returns:
- the annotations.
-
-