Enum AnnotationValueFilter.Default
- java.lang.Object
-
- java.lang.Enum<AnnotationValueFilter.Default>
-
- net.bytebuddy.implementation.attribute.AnnotationValueFilter.Default
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AnnotationValueFilter.Default>
,AnnotationValueFilter
,AnnotationValueFilter.Factory
- Enclosing interface:
- AnnotationValueFilter
public static enum AnnotationValueFilter.Default extends java.lang.Enum<AnnotationValueFilter.Default> implements AnnotationValueFilter, AnnotationValueFilter.Factory
A default implementation of an annotation value filter that applies the same strategy for any type, field or method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.attribute.AnnotationValueFilter
AnnotationValueFilter.Default, AnnotationValueFilter.Factory
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPEND_DEFAULTS
An annotation value filter where default values are included in the class file.SKIP_DEFAULTS
An annotation value filter where default values are skipped and not included in the class file.
-
Constructor Summary
Constructors Modifier Constructor Description private
Default()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationValueFilter
on(FieldDescription fieldDescription)
Creates an annotation value filter for writing annotations on a field.AnnotationValueFilter
on(MethodDescription methodDescription)
Creates an annotation value filter for writing annotations on a method.AnnotationValueFilter
on(RecordComponentDescription recordComponentDescription)
Creates an annotation value filter for writing annotations on a record component.AnnotationValueFilter
on(TypeDescription instrumentedType)
Creates an annotation value filter for writing annotations on an instrumented type.static AnnotationValueFilter.Default
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AnnotationValueFilter.Default[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.bytebuddy.implementation.attribute.AnnotationValueFilter
isRelevant
-
-
-
-
Enum Constant Detail
-
SKIP_DEFAULTS
public static final AnnotationValueFilter.Default SKIP_DEFAULTS
An annotation value filter where default values are skipped and not included in the class file.
-
APPEND_DEFAULTS
public static final AnnotationValueFilter.Default APPEND_DEFAULTS
An annotation value filter where default values are included in the class file.
-
-
Method Detail
-
values
public static AnnotationValueFilter.Default[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AnnotationValueFilter.Default c : AnnotationValueFilter.Default.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AnnotationValueFilter.Default valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
on
public AnnotationValueFilter on(TypeDescription instrumentedType)
Creates an annotation value filter for writing annotations on an instrumented type.- Specified by:
on
in interfaceAnnotationValueFilter.Factory
- Parameters:
instrumentedType
- The instrumented type onto which the annotations are written.- Returns:
- An annotation value filter to be used when writing annotations onto the given type.
-
on
public AnnotationValueFilter on(FieldDescription fieldDescription)
Creates an annotation value filter for writing annotations on a field.- Specified by:
on
in interfaceAnnotationValueFilter.Factory
- Parameters:
fieldDescription
- The field onto which the annotations are written.- Returns:
- An annotation value filter to be used when writing annotations onto the given field.
-
on
public AnnotationValueFilter on(MethodDescription methodDescription)
Creates an annotation value filter for writing annotations on a method.- Specified by:
on
in interfaceAnnotationValueFilter.Factory
- Parameters:
methodDescription
- The method onto which the annotations are written.- Returns:
- An annotation value filter to be used when writing annotations onto the given method.
-
on
public AnnotationValueFilter on(RecordComponentDescription recordComponentDescription)
Creates an annotation value filter for writing annotations on a record component.- Specified by:
on
in interfaceAnnotationValueFilter.Factory
- Parameters:
recordComponentDescription
- The record component onto which the annotations are written.- Returns:
- An annotation value filter to be used when writing annotations onto the given record component.
-
-