Package net.bytebuddy.pool
Class TypePool.Default.TypeExtractor.AnnotationExtractor
- java.lang.Object
-
- org.objectweb.asm.AnnotationVisitor
-
- net.bytebuddy.pool.TypePool.Default.TypeExtractor.AnnotationExtractor
-
- Enclosing class:
- TypePool.Default.TypeExtractor
protected class TypePool.Default.TypeExtractor.AnnotationExtractor extends org.objectweb.asm.AnnotationVisitor
An annotation extractor reads an annotation found in a class field an collects data that is relevant to creating a related annotation description.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TypePool.Default.TypeExtractor.AnnotationExtractor.AnnotationLookup
An annotation registrant for registering the values on an array that is itself an annotation property.protected class
TypePool.Default.TypeExtractor.AnnotationExtractor.ArrayLookup
An annotation registrant for registering values of an array.
-
Field Summary
Fields Modifier and Type Field Description private TypePool.Default.AnnotationRegistrant
annotationRegistrant
The annotation registrant to register found annotation values on.private TypePool.Default.ComponentTypeLocator
componentTypeLocator
A locator for the component type of any found annotation value.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotationExtractor(java.lang.String descriptor, int index, java.util.Map<java.lang.Integer,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens, TypePool.Default.ComponentTypeLocator componentTypeLocator)
Creates a new annotation extractor for a byte code element with an index.protected
AnnotationExtractor(java.lang.String descriptor, java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, TypePool.Default.ComponentTypeLocator componentTypeLocator)
Creates a new annotation extractor for a byte code element without an index.protected
AnnotationExtractor(TypePool.Default.AnnotationRegistrant annotationRegistrant, TypePool.Default.ComponentTypeLocator componentTypeLocator)
Creates a new annotation extractor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(java.lang.String name, java.lang.Object value)
org.objectweb.asm.AnnotationVisitor
visitAnnotation(java.lang.String name, java.lang.String descriptor)
org.objectweb.asm.AnnotationVisitor
visitArray(java.lang.String name)
void
visitEnd()
void
visitEnum(java.lang.String name, java.lang.String descriptor, java.lang.String value)
-
-
-
Field Detail
-
annotationRegistrant
private final TypePool.Default.AnnotationRegistrant annotationRegistrant
The annotation registrant to register found annotation values on.
-
componentTypeLocator
private final TypePool.Default.ComponentTypeLocator componentTypeLocator
A locator for the component type of any found annotation value.
-
-
Constructor Detail
-
AnnotationExtractor
protected AnnotationExtractor(java.lang.String descriptor, java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken> annotationTokens, TypePool.Default.ComponentTypeLocator componentTypeLocator)
Creates a new annotation extractor for a byte code element without an index.- Parameters:
descriptor
- The annotation descriptor.annotationTokens
- The collection for storing any discovered annotation tokens.componentTypeLocator
- The component type locator to use.
-
AnnotationExtractor
protected AnnotationExtractor(java.lang.String descriptor, int index, java.util.Map<java.lang.Integer,java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>> annotationTokens, TypePool.Default.ComponentTypeLocator componentTypeLocator)
Creates a new annotation extractor for a byte code element with an index.- Parameters:
descriptor
- The annotation descriptor.index
- The index of the element for which the annotations are collected.annotationTokens
- The collection for storing any discovered annotation tokens.componentTypeLocator
- The component type locator to use.
-
AnnotationExtractor
protected AnnotationExtractor(TypePool.Default.AnnotationRegistrant annotationRegistrant, TypePool.Default.ComponentTypeLocator componentTypeLocator)
Creates a new annotation extractor.- Parameters:
annotationRegistrant
- The annotation registrant to register found annotation values on.componentTypeLocator
- A locator for the component type of any found annotation value.
-
-
Method Detail
-
visit
public void visit(java.lang.String name, java.lang.Object value)
- Overrides:
visit
in classorg.objectweb.asm.AnnotationVisitor
-
visitEnum
public void visitEnum(java.lang.String name, java.lang.String descriptor, java.lang.String value)
- Overrides:
visitEnum
in classorg.objectweb.asm.AnnotationVisitor
-
visitAnnotation
public org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String name, java.lang.String descriptor)
- Overrides:
visitAnnotation
in classorg.objectweb.asm.AnnotationVisitor
-
visitArray
public org.objectweb.asm.AnnotationVisitor visitArray(java.lang.String name)
- Overrides:
visitArray
in classorg.objectweb.asm.AnnotationVisitor
-
visitEnd
public void visitEnd()
- Overrides:
visitEnd
in classorg.objectweb.asm.AnnotationVisitor
-
-