In the following text, the term expected types denotes the set of types defined by
the types, withSubtypes and withAnnotations
members of the @Enhancement annotation. The term discovered types denotes
the subset of expected types that were discovered during type discovery.
Methods annotated @Enhancement must declare exactly one parameter of one of these types:
@Enhancement method has a parameter of type ClassConfig or ClassInfo,
the method is called once for each discovered type.
If an @Enhancement method has a parameter of type MethodConfig or MethodInfo,
the method is called once for each constructor or method that is declared on each discovered type,
as defined in ClassInfo.
and ClassInfo..
If an @Enhancement method has a parameter of type FieldConfig or FieldInfo,
the method is called once for each field that is declared on each discovered type, as defined
in ClassInfo..
If the @Enhancement method doesn't declare any parameter of one of these types,
or if it declares more than one, the container treats it as a definition error.
Additionally, methods annotated @Enhancement may declare parameters of these types:
Finally, AnnotationBuilder may be used to create instances
of AnnotationInfo.
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public Class | Returns: types of annotations that must be present on the expected typesNarrows down the set of expected types, defined by |
| public boolean | Returns: whether subtypes should be included in the set of expected typesIf |
| types | back to summary |
|---|---|
| public Class Defines the set of expected types. If
| |
| withAnnotations | back to summary |
|---|---|
| public Class Narrows down the set of expected types, defined by
If empty, the set of expected types is not narrowed down in any way.
If Defaults to an empty array, so that the set of expected types is not narrowed down in any way.
| |
| withSubtypes | back to summary |
|---|---|
| public boolean withSubtypes() If
| |