org.apache.felix.ipojo.manipulation

## Class ClassChecker.AnnotationDescriptor

- java.lang.Object
- - org.objectweb.asm.AnnotationVisitor
  - - org.apache.felix.ipojo.manipulation.ClassChecker.AnnotationDescriptor

Enclosing class:
  ClassChecker

    public class ClassChecker.AnnotationDescriptor
    extends org.objectweb.asm.AnnotationVisitor

Describes a method or constructor annotation. This allows creating a copy of the annotations found in the original class to move them on inserted method. This class implements an `AnnotationVisitor` in order to create the copy. This class contains a `visit` method re-injecting the annotation in the generated method.

Author:
  Felix Project Team

### Field Summary

### Fields inherited from class org.objectweb.asm.AnnotationVisitor

`api, av`

### Constructor Summary

Constructors
Constructor and Description
`AnnotationDescriptor(String name, boolean visible)` Creates an annotation descriptor.
`AnnotationDescriptor(String name, String desc)` Creates an annotation descriptor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `visit(org.objectweb.asm.AnnotationVisitor mv)` Method allowing to recreate the visited (stored) annotation into the destination annotation.
`void` `visit(String arg0, Object arg1)` Visits a simple attribute.
`void` `visitAnnotation(org.objectweb.asm.MethodVisitor mv)` Methods allowing to recreate the visited (stored) annotation into the destination method.
`org.objectweb.asm.AnnotationVisitor` `visitAnnotation(String arg0, String arg1)` Visits a nested annotation.
`org.objectweb.asm.AnnotationVisitor` `visitArray(String arg0)` Visits an array attribute.
`void` `visitEnd()` End of the visit.
`void` `visitEnum(String arg0, String arg1, String arg2)` Visits an enumeration attribute.
`void` `visitParameterAnnotation(int id, org.objectweb.asm.MethodVisitor mv)` Methods allowing to recreate the visited (stored) parameter annotations into the destination method.

### Methods inherited from class org.objectweb.asm.AnnotationVisitor

`getDelegate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AnnotationDescriptor

    public AnnotationDescriptor(String name,
                                boolean visible)

Creates an annotation descriptor. This constructor is used for 'root' annotations.

Parameters:
  `name` - the name of the annotation
  `visible` - the visibility of the annotation at runtime

#### AnnotationDescriptor

    public AnnotationDescriptor(String name,
                                String desc)

Creates an annotation descriptor. This constructor is used for nested annotations.

Parameters:
  `name` - the name of the annotation
  `desc` - the descriptor of the annotation

### Method Detail

#### visit

    public void visit(String arg0,
                      Object arg1)

Visits a simple attribute.

Overrides:
  `visit` in class `org.objectweb.asm.AnnotationVisitor`
Parameters:
  `arg0` - the attribute name
  `arg1` - the attribute value
See Also:
  `AnnotationVisitor.visit(java.lang.String, java.lang.Object)`

#### visitAnnotation

    public org.objectweb.asm.AnnotationVisitor visitAnnotation(String arg0,
                                                               String arg1)

Visits a nested annotation.

Overrides:
  `visitAnnotation` in class `org.objectweb.asm.AnnotationVisitor`
Parameters:
  `arg0` - the attribute name
  `arg1` - the annotation descriptor
Returns:
  the annotation visitor parsing the nested annotation
See Also:
  `AnnotationVisitor.visitAnnotation(java.lang.String, java.lang.String)`

#### visitArray

    public org.objectweb.asm.AnnotationVisitor visitArray(String arg0)

Visits an array attribute.

Overrides:
  `visitArray` in class `org.objectweb.asm.AnnotationVisitor`
Parameters:
  `arg0` - the name of the attribute
Returns:
  the annotation visitor parsing the content of the array, uses a specific `ClassChecker.ArrayAttribute` to parse this array
See Also:
  `AnnotationVisitor.visitArray(java.lang.String)`

#### visitEnd

    public void visitEnd()

End of the visit.

Overrides:
  `visitEnd` in class `org.objectweb.asm.AnnotationVisitor`
See Also:
  `AnnotationVisitor.visitEnd()`

#### visitEnum

    public void visitEnum(String arg0,
                          String arg1,
                          String arg2)

Visits an enumeration attribute.

Overrides:
  `visitEnum` in class `org.objectweb.asm.AnnotationVisitor`
Parameters:
  `arg0` - the attribute name
  `arg1` - the enumeration descriptor
  `arg2` - the attribute value
See Also:
  `AnnotationVisitor.visitEnum(java.lang.String, java.lang.String, java.lang.String)`

#### visitAnnotation

    public void visitAnnotation(org.objectweb.asm.MethodVisitor mv)

Methods allowing to recreate the visited (stored) annotation into the destination method. This method recreate the annotations itself and any other attributes.

Parameters:
  `mv` - the method visitor visiting the destination method.

#### visitParameterAnnotation

    public void visitParameterAnnotation(int id,
                                         org.objectweb.asm.MethodVisitor mv)

Methods allowing to recreate the visited (stored) parameter annotations into the destination method. This method recreate the annotations itself and any other attributes.

Parameters:
  `id` - the paramter id
  `mv` - the method visitor visiting the destination method.

#### visit

    public void visit(org.objectweb.asm.AnnotationVisitor mv)

Method allowing to recreate the visited (stored) annotation into the destination annotation. This method is used only for nested annotation.

Parameters:
  `mv` - the annotation visitor to populate with the stored annotation