org.apache.felix.ipojo.manipulator.metadata.annotation

## Class ClassMetadataCollector

- java.lang.Object
- - org.objectweb.asm.ClassVisitor
  - - org.apache.felix.ipojo.manipulator.metadata.annotation.ClassMetadataCollector

    public class ClassMetadataCollector
    extends org.objectweb.asm.ClassVisitor

Author:
  Felix Project Team

### Field Summary

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

`api, cv`

### Constructor Summary

Constructors
Constructor and Description
`ClassMetadataCollector(BindingRegistry registry, Reporter reporter)`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.felix.ipojo.metadata.Element` `getComponentMetadata()` Build metadata.
`org.apache.felix.ipojo.metadata.Element` `getInstanceMetadata()` Build instance metadata.
`void` `visit(int version, int access, String name, String signature, String superName, String[] interfaces)`
`org.objectweb.asm.AnnotationVisitor` `visitAnnotation(String desc, boolean visible)` Visit class annotations.
`void` `visitEnd()` End of the visit : compute final elements.
`org.objectweb.asm.FieldVisitor` `visitField(int access, String name, String desc, String signature, Object value)` Visit a field.
`org.objectweb.asm.MethodVisitor` `visitMethod(int access, String name, String desc, String signature, String[] exceptions)` Visit a method.

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

`getDelegate, visitAttribute, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation`

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

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

### Constructor Detail

#### ClassMetadataCollector

    public ClassMetadataCollector(BindingRegistry registry,
                                  Reporter reporter)

### Method Detail

#### getComponentMetadata

    public org.apache.felix.ipojo.metadata.Element getComponentMetadata()

Build metadata. May be null if no "component type" was found.

Returns:
  Build metadata. May be null if no "component type" was found.

#### getInstanceMetadata

    public org.apache.felix.ipojo.metadata.Element getInstanceMetadata()

Build instance metadata. May be null if no "component type" was found.

Returns:
  Build metadata. May be null if no "component type" was found.

#### visit

    public void visit(int version,
                      int access,
                      String name,
                      String signature,
                      String superName,
                      String[] interfaces)

Overrides:
  `visit` in class `org.objectweb.asm.ClassVisitor`

#### visitAnnotation

    public org.objectweb.asm.AnnotationVisitor visitAnnotation(String desc,
                                                               boolean visible)

Visit class annotations. This method detects @component and @provides annotations.

Overrides:
  `visitAnnotation` in class `org.objectweb.asm.ClassVisitor`
Parameters:
  `desc` - : annotation descriptor.
  `visible` - : is the annotation visible at runtime.
Returns:
  the annotation visitor.
See Also:
  `ClassVisitor.visitAnnotation(java.lang.String, boolean)`

#### visitField

    public org.objectweb.asm.FieldVisitor visitField(int access,
                                                     String name,
                                                     String desc,
                                                     String signature,
                                                     Object value)

Visit a field. Call the field collector visitor.

Overrides:
  `visitField` in class `org.objectweb.asm.ClassVisitor`
Parameters:
  `access` - : field access.
  `name` - : field name
  `desc` - : field descriptor
  `signature` - : field signature
  `value` - : field value (static field only)
Returns:
  the field visitor.
See Also:
  `ClassVisitor.visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)`

#### visitMethod

    public org.objectweb.asm.MethodVisitor visitMethod(int access,
                                                       String name,
                                                       String desc,
                                                       String signature,
                                                       String[] exceptions)

Visit a method. Call the method collector visitor.

Overrides:
  `visitMethod` in class `org.objectweb.asm.ClassVisitor`
Parameters:
  `access` - : method access
  `name` - : method name
  `desc` - : method descriptor
  `signature` - : method signature
  `exceptions` - : method exceptions
Returns:
  the Method Visitor.
See Also:
  `ClassVisitor.visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])`

#### visitEnd

    public void visitEnd()

End of the visit : compute final elements.

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