Interface ClassConfig
- All Superinterfaces:
 DeclarationConfig
Allows adding annotations to and removing annotations from a class.
 Note that the class is not physically altered, the modifications
 are only seen by the CDI container.
- Since:
 - 4.0
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation(AnnotationInfo annotation) Adds given annotation to this class.addAnnotation(Annotation annotation) Adds given annotation to this class.addAnnotation(Class<? extends Annotation> annotationType) Adds a marker annotation of given type to this class.Returns a collection ofMethodConfigobjects for each constructor of this class, as defined byClassInfo.constructors.fields()Returns a collection ofFieldConfigobjects for each field of this class, as defined byClassInfo.fields.info()Returns theClassInfocorresponding to this transformed class.methods()Returns a collection ofMethodConfigobjects for each method of this class, as defined byClassInfo.methods.Removes all annotations from this class.removeAnnotation(Predicate<AnnotationInfo> predicate) Removes all annotations matching given predicate from this class. 
- 
Method Details
- 
info
ClassInfo info()Returns theClassInfocorresponding to this transformed class.- Specified by:
 infoin interfaceDeclarationConfig- Returns:
 - the 
ClassInfocorresponding to this transformed class, nevernull 
 - 
addAnnotation
Adds a marker annotation of given type to this class. Does not allow configuring annotation members.- Specified by:
 addAnnotationin interfaceDeclarationConfig- Parameters:
 annotationType- the annotation type, must not benull- Returns:
 - this configurator object, to allow fluent usage
 
 - 
addAnnotation
Adds given annotation to this class. TheAnnotationInfocan be obtained from an annotation target, or constructed from scratch usingAnnotationBuilder.- Specified by:
 addAnnotationin interfaceDeclarationConfig- Parameters:
 annotation- the annotation to add to this class, must not benull- Returns:
 - this configurator object, to allow fluent usage
 
 - 
addAnnotation
Adds given annotation to this class. The annotation instance is typically a subclass ofAnnotationLiteral.- Specified by:
 addAnnotationin interfaceDeclarationConfig- Parameters:
 annotation- the annotation to add to this class, must not benull- Returns:
 - this configurator object, to allow fluent usage
 
 - 
removeAnnotation
Removes all annotations matching given predicate from this class.- Specified by:
 removeAnnotationin interfaceDeclarationConfig- Parameters:
 predicate- an annotation predicate, must not benull- Returns:
 - this configurator object, to allow fluent usage
 
 - 
removeAllAnnotations
ClassConfig removeAllAnnotations()Removes all annotations from this class.- Specified by:
 removeAllAnnotationsin interfaceDeclarationConfig- Returns:
 - this configurator object, to allow fluent usage
 
 - 
constructors
Collection<MethodConfig> constructors()Returns a collection ofMethodConfigobjects for each constructor of this class, as defined byClassInfo.constructors.- Returns:
 - immutable collection of 
MethodConfigobjects, nevernull 
 - 
methods
Collection<MethodConfig> methods()Returns a collection ofMethodConfigobjects for each method of this class, as defined byClassInfo.methods.- Returns:
 - immutable collection of 
MethodConfigobjects, nevernull 
 - 
fields
Collection<FieldConfig> fields()Returns a collection ofFieldConfigobjects for each field of this class, as defined byClassInfo.fields.- Returns:
 - immutable collection of 
FieldConfigobjects, nevernull 
 
 -