org.jboss.reflect.plugins.javassist
Class JavassistTypeInfoFactory

java.lang.Object
  extended by org.jboss.reflect.plugins.javassist.JavassistTypeInfoFactory
All Implemented Interfaces:
TypeInfoFactory
Direct Known Subclasses:
JavassistAnnotationHelper

public class JavassistTypeInfoFactory
extends Object
implements TypeInfoFactory

An javassist type factory that uses a static delegate.

This avoids recalculating things everytime a factory is constructed inside the same classloader

Author:
Adrian Brock

Field Summary
protected static JavassistTypeInfoFactoryImpl delegate
          The delegate
 
Constructor Summary
JavassistTypeInfoFactory()
           
 
Method Summary
 TypeInfo getTypeInfo(Class<?> clazz)
          Get a type info
 TypeInfo getTypeInfo(String name, ClassLoader cl)
          Get a type info
 TypeInfo getTypeInfo(Type type)
          Get a type info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected static JavassistTypeInfoFactoryImpl delegate
The delegate

Constructor Detail

JavassistTypeInfoFactory

public JavassistTypeInfoFactory()
Method Detail

getTypeInfo

public TypeInfo getTypeInfo(Class<?> clazz)
Description copied from interface: TypeInfoFactory
Get a type info

Specified by:
getTypeInfo in interface TypeInfoFactory
Parameters:
clazz - the class
Returns:
the type info

getTypeInfo

public TypeInfo getTypeInfo(String name,
                            ClassLoader cl)
                     throws ClassNotFoundException
Description copied from interface: TypeInfoFactory
Get a type info

Specified by:
getTypeInfo in interface TypeInfoFactory
Parameters:
name - the class name
cl - the classloader
Returns:
the type info
Throws:
ClassNotFoundException - when there is no such class

getTypeInfo

public TypeInfo getTypeInfo(Type type)
Description copied from interface: TypeInfoFactory
Get a type info

Specified by:
getTypeInfo in interface TypeInfoFactory
Parameters:
type - the type
Returns:
the type info


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