org.jboss.reflect.plugins.javassist
Class JavassistAnnotationHelper

java.lang.Object
  extended by org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory
      extended by org.jboss.reflect.plugins.javassist.JavassistAnnotationHelper
All Implemented Interfaces:
AnnotationHelper, TypeInfoFactory

public class JavassistAnnotationHelper
extends JavassistTypeInfoFactory
implements AnnotationHelper

An javassist annotation helper that uses a static delegate.

This avoids recalculating things everytime a helper is constructed inside the same classloader. Extends JavassistTypeInfo to get access to delegate + simplifies usage when TIF must also be used as AnnotationHelper.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory
delegate
 
Constructor Summary
JavassistAnnotationHelper()
           
 
Method Summary
 AnnotationValue createAnnotationValue(AnnotationInfo info, Object ann)
          Create an annotation from the underlying implementation and its info type
 AnnotationValue[] getAnnotations(Object object)
          Get the annotations for the annotated object
 
Methods inherited from class org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory
getTypeInfo, getTypeInfo, getTypeInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavassistAnnotationHelper

public JavassistAnnotationHelper()
Method Detail

getAnnotations

public AnnotationValue[] getAnnotations(Object object)
Description copied from interface: AnnotationHelper
Get the annotations for the annotated object

Specified by:
getAnnotations in interface AnnotationHelper
Parameters:
object - the annotated object
Returns:
the annotations

createAnnotationValue

public AnnotationValue createAnnotationValue(AnnotationInfo info,
                                             Object ann)
Description copied from interface: AnnotationHelper
Create an annotation from the underlying implementation and its info type

Specified by:
createAnnotationValue in interface AnnotationHelper
Parameters:
info - the annotation info
ann - the underlying annotation
Returns:
the annotation value


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.