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

public Interface FieldConfig

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

Allows adding annotations to and removing annotations from a field. Note that the field 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 FieldConfig

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 field.

public FieldConfig

Returns:

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

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

Adds given annotation to this field.

public FieldConfig

Returns:

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

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

Adds given annotation to this field.

public FieldInfo

Returns:

the FieldInfo corresponding to this transformed field, never null
info
()

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

Returns the FieldInfo corresponding to this transformed field.

public FieldConfig

Returns:

this configurator object, to allow fluent usage
removeAllAnnotations
()

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

Removes all annotations from this field.

public FieldConfig

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 field.

Method Detail

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

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

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

Parameters
annotationType:Class<? extends Annotation>

the annotation type, must not be null

Returns:FieldConfig

this configurator object, to allow fluent usage

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

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

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

Parameters
annotation:AnnotationInfo

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

Returns:FieldConfig

this configurator object, to allow fluent usage

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

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

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

Parameters
annotation:Annotation

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

Returns:FieldConfig

this configurator object, to allow fluent usage

Annotations
@Override
infoback to summary
public FieldInfo info()

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

Returns the FieldInfo corresponding to this transformed field.

Returns:FieldInfo

the FieldInfo corresponding to this transformed field, never null

Annotations
@Override
removeAllAnnotationsback to summary
public FieldConfig removeAllAnnotations()

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

Removes all annotations from this field.

Returns:FieldConfig

this configurator object, to allow fluent usage

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

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

Removes all annotations matching given predicate from this field.

Parameters
predicate:Predicate<AnnotationInfo>

an annotation predicate, must not be null

Returns:FieldConfig

this configurator object, to allow fluent usage

Annotations
@Override