Package io.micronaut.context.annotation
Annotation Interface ClassImport
Allows importing an already compiled set of classes and processed them like a non-compiled class.
The difference between
Import
and this annotation, is that classes added using Import
are not processed using the type visitors.
Note that this annotation is likely to require more use of reflection if package protected members require injection.
- Since:
- 4.9
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
Repeated wrapper for this annotation. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends Annotation>[]
Annotate every class with the given annotation types.String[]
Alternative way to specify the value for `annotate` when the class cannot be referenced.Class<?>[]
String[]
Alternative way to specify the value for `classes` when the class cannot be referenced.Class<? extends Annotation>[]
The annotation types to exclude in a search when specifying thepackages()
attribute (this attribute has no effect when combined withclasses()
).Class<? extends Annotation>[]
The annotation types that if present on the property cause only the properties with the specified annotation to be included in the result.String[]
A list of package names to import.
-
Element Details
-
classes
Class<?>[] classes- Returns:
- The classes to import.
- Default:
- {}
-
classNames
Alternative way to specify the value for `classes` when the class cannot be referenced.- Returns:
- The class names to generate introspections for
- Default:
- {}
-
packages
String[] packagesA list of package names to import.Note when
classes()
orclassNames()
is specified this attribute is ignored- Returns:
- The packages to import.
- Default:
- {}
-
annotate
Class<? extends Annotation>[] annotateAnnotate every class with the given annotation types.- Returns:
- The annotations
- Default:
- {}
-
annotateNames
Alternative way to specify the value for `annotate` when the class cannot be referenced.- Returns:
- The annotation names
- Default:
- {}
-
excludedAnnotations
Class<? extends Annotation>[] excludedAnnotationsThe annotation types to exclude in a search when specifying thepackages()
attribute (this attribute has no effect when combined withclasses()
).- Returns:
- The annotation types
- Default:
- {}
-
includedAnnotations
Class<? extends Annotation>[] includedAnnotationsThe annotation types that if present on the property cause only the properties with the specified annotation to be included in the result.- Returns:
- The annotation types
- Default:
- {}
-
targetPackage
String targetPackage- Returns:
- The package to write any kind of generated metadata to. By default, uses the class package.
- Default:
- ""
-