Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.aspectwerkz.annotation.instrumentation.asm
Class CustomAttributeHelper

    java.lang.Object
      org.codehaus.aspectwerkz.annotation.instrumentation.asm.CustomAttributeHelper

    public class CustomAttributeHelper

extends Object

Helper class to wrap a custom annotation proxy (1.3/1.4 javadoc annotation) in a RuntimeInvisibleAnnotations.
The proxy is wrapped in a AnnotationInfo object which is serialized and base64 encoded (ASM issue on array types in RIV).

Author:
  Alexandre Vasseur

Constructor Summary
`CustomAttributeHelper()`

Method Summary
`static org.objectweb.asm.attrs.Annotation` | `createCustomAnnotation(byte[] bytes)` Create an Annotation bytecode representation from the serialized version of the custom annotation proxy
`static AnnotationInfo` | `extractCustomAnnotation(org.objectweb.asm.attrs.Annotation annotation)` Extract the AnnotationInfo from the bytecode Annotation representation.
`static org.objectweb.asm.attrs.RuntimeInvisibleAnnotations` | `linkRuntimeInvisibleAnnotations(org.objectweb.asm.Attribute attribute)` Helper method to find the first RuntimeInvisibleAnnotations attribute in an Attribute chain.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CustomAttributeHelper

    public CustomAttributeHelper()

Method Detail

### extractCustomAnnotation

    public static AnnotationInfo extractCustomAnnotation(org.objectweb.asm.attrs.Annotation annotation)

  Extract the AnnotationInfo from the bytecode Annotation representation.

  Parameters:
    `annotation` - must be a valid RIV, of type CustomAttribute.TYPE
  Returns:

### createCustomAnnotation

    public static org.objectweb.asm.attrs.Annotation createCustomAnnotation(byte[] bytes)

  Create an Annotation bytecode representation from the serialized version of the custom annotation proxy

  Parameters:
    `bytes` -
  Returns:

### linkRuntimeInvisibleAnnotations

    public static org.objectweb.asm.attrs.RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(org.objectweb.asm.Attribute attribute)

  Helper method to find the first RuntimeInvisibleAnnotations attribute in an Attribute chain.
  If no such RIV exists, a new one is created (empty) and added last in the chain.
  If the chain is null, a new sole RIV (empty) is created

  Parameters:
    `attribute` -
  Returns:
    the RuntimeInvisibleAnnotations to add Annotation to

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.