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

## Class RequiresVisitor

- java.lang.Object
- - org.objectweb.asm.AnnotationVisitor
  - - org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.RequiresVisitor

    public class RequiresVisitor
    extends org.objectweb.asm.AnnotationVisitor

AnnotationVisitor parsing the @Requires annotation.

Author:
  Felix Project Team
See Also:
  `Requires`

### Field Summary

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

`api, av`

### Constructor Summary

Constructors
Constructor and Description
`RequiresVisitor(ComponentWorkbench workbench, String name)` Constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static String` `getPolicy(String policy)` Gets the iPOJO binding policy name from the given value.
`void` `visit(String name, Object value)` Visit one "simple" annotation.
`void` `visitEnd()` End of the annotation.
`void` `visitEnum(String name, String desc, String value)`

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

`getDelegate, visitAnnotation, visitArray`

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

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

### Constructor Detail

#### RequiresVisitor

    public RequiresVisitor(ComponentWorkbench workbench,
                           String name)

Constructor.

Parameters:
  `name` - : field name.

### Method Detail

#### visit

    public void visit(String name,
                      Object value)

Visit one "simple" annotation.

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

#### visitEnum

    public void visitEnum(String name,
                          String desc,
                          String value)

Overrides:
  `visitEnum` in class `org.objectweb.asm.AnnotationVisitor`

#### visitEnd

    public void visitEnd()

End of the annotation. Create a "requires" element

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

#### getPolicy

    public static String getPolicy(String policy)

Gets the iPOJO binding policy name from the given value.

Parameters:
  `policy` - the read policy
Returns:
  the policy name