Class AnnotationSource.Explicit
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationSource.Explicit
-
- All Implemented Interfaces:
AnnotationSource
- Enclosing interface:
- AnnotationSource
@Enhance public static class AnnotationSource.Explicit extends java.lang.Object implements AnnotationSource
An annotation source that declares a given list of annotations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<? extends AnnotationDescription>
annotations
The represented annotations.
-
Constructor Summary
Constructors Constructor Description Explicit(java.util.List<? extends AnnotationDescription> annotations)
Creates a new explicit annotation source.Explicit(AnnotationDescription... annotation)
Creates a new explicit annotation source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationList
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
-
-
-
Field Detail
-
annotations
private final java.util.List<? extends AnnotationDescription> annotations
The represented annotations.
-
-
Constructor Detail
-
Explicit
public Explicit(AnnotationDescription... annotation)
Creates a new explicit annotation source.- Parameters:
annotation
- The represented annotations.
-
Explicit
public Explicit(java.util.List<? extends AnnotationDescription> annotations)
Creates a new explicit annotation source.- Parameters:
annotations
- The represented annotations.
-
-
Method Detail
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.- Specified by:
getDeclaredAnnotations
in interfaceAnnotationSource
- Returns:
- A list of declared annotations.
-
-