Top Description Methods
jakarta.enterprise.inject.build.compatible.spi

public Interface ClassConfig

extends DeclarationConfig
Imports
jakarta.enterprise.lang.model.AnnotationInfo, jakarta.enterprise.lang.model.declarations.ClassInfo, java.lang.annotation.Annotation, java.util.Collection, java.util.function.Predicate

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
Enhancement

Method Summary

Modifier and TypeMethod and Description
public ClassConfig

Returns:

this configurator object, to allow fluent usage
addAnnotation
(Class<? extends Annotation>
the annotation type, must not be null
annotationType
)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.addAnnotation.

Adds a marker annotation of given type to this class.
public ClassConfig

Returns:

this configurator object, to allow fluent usage
addAnnotation
(AnnotationInfo
the annotation to add to this class, must not be null
annotation
)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.addAnnotation.

Adds given annotation to this class.
public ClassConfig

Returns:

this configurator object, to allow fluent usage
addAnnotation
(Annotation
the annotation to add to this class, must not be null
annotation
)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.addAnnotation.

Adds given annotation to this class.
public Collection<MethodConfig>

Returns:

immutable collection of MethodConfig objects, never null
constructors
()

Returns a collection of MethodConfig objects for each constructor of this class, as defined by ClassInfo.constructors.

public Collection<FieldConfig>

Returns:

immutable collection of FieldConfig objects, never null
fields
()

Returns a collection of FieldConfig objects for each field of this class, as defined by ClassInfo.fields.

public ClassInfo

Returns:

the ClassInfo corresponding to this transformed class, never null
info
()

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.info.

Returns the ClassInfo corresponding to this transformed class.
public Collection<MethodConfig>

Returns:

immutable collection of MethodConfig objects, never null
methods
()

Returns a collection of MethodConfig objects for each method of this class, as defined by ClassInfo.methods.

public ClassConfig

Returns:

this configurator object, to allow fluent usage
removeAllAnnotations
()

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.removeAllAnnotations.

Removes all annotations from this class.
public ClassConfig

Returns:

this configurator object, to allow fluent usage
removeAnnotation
(Predicate<AnnotationInfo>
an annotation predicate, must not be null
predicate
)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.removeAnnotation.

Removes all annotations matching given predicate from this class.

Method Detail

addAnnotationback to summary
public ClassConfig addAnnotation(Class<? extends Annotation> annotationType)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.addAnnotation.

Adds a marker annotation of given type to this class. Does not allow configuring annotation members.

Parameters
annotationType:Class<? extends Annotation>

the annotation type, must not be null

Returns:ClassConfig

this configurator object, to allow fluent usage

Annotations
@Override
addAnnotationback to summary
public ClassConfig addAnnotation(AnnotationInfo annotation)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.addAnnotation.

Adds given annotation to this class. The AnnotationInfo can be obtained from an annotation target, or constructed from scratch using AnnotationBuilder.

Parameters
annotation:AnnotationInfo

the annotation to add to this class, must not be null

Returns:ClassConfig

this configurator object, to allow fluent usage

Annotations
@Override
addAnnotationback to summary
public ClassConfig addAnnotation(Annotation annotation)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.addAnnotation.

Adds given annotation to this class. The annotation instance is typically a subclass of AnnotationLiteral.

Parameters
annotation:Annotation

the annotation to add to this class, must not be null

Returns:ClassConfig

this configurator object, to allow fluent usage

Annotations
@Override
constructorsback to summary
public Collection<MethodConfig> constructors()

Returns a collection of MethodConfig objects for each constructor of this class, as defined by ClassInfo.constructors.

Returns:Collection<MethodConfig>

immutable collection of MethodConfig objects, never null

fieldsback to summary
public Collection<FieldConfig> fields()

Returns a collection of FieldConfig objects for each field of this class, as defined by ClassInfo.fields.

Returns:Collection<FieldConfig>

immutable collection of FieldConfig objects, never null

infoback to summary
public ClassInfo info()

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.info.

Returns the ClassInfo corresponding to this transformed class.

Returns:ClassInfo

the ClassInfo corresponding to this transformed class, never null

Annotations
@Override
methodsback to summary
public Collection<MethodConfig> methods()

Returns a collection of MethodConfig objects for each method of this class, as defined by ClassInfo.methods.

Returns:Collection<MethodConfig>

immutable collection of MethodConfig objects, never null

removeAllAnnotationsback to summary
public ClassConfig removeAllAnnotations()

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.removeAllAnnotations.

Removes all annotations from this class.

Returns:ClassConfig

this configurator object, to allow fluent usage

Annotations
@Override
removeAnnotationback to summary
public ClassConfig removeAnnotation(Predicate<AnnotationInfo> predicate)

Redeclares jakarta.enterprise.inject.build.compatible.spi.DeclarationConfig.removeAnnotation.

Removes all annotations matching given predicate from this class.

Parameters
predicate:Predicate<AnnotationInfo>

an annotation predicate, must not be null

Returns:ClassConfig

this configurator object, to allow fluent usage

Annotations
@Override