JBoss Reflection 2.2.1.SP1

org.jboss.reflect.plugins.bytecode
Class BytecodeTypeInfoFactory

java.lang.Object
  extended by org.jboss.reflect.plugins.bytecode.BytecodeTypeInfoFactory
All Implemented Interfaces:
TypeInfoFactory

public class BytecodeTypeInfoFactory
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 BytecodeTypeInfoFactoryImpl delegate
          The delegate
 
Constructor Summary
BytecodeTypeInfoFactory()
           
 
Method Summary
 ClassLoaderFinder getClassLoaderFinder()
          Get the classloader finder
 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
 void setClassLoaderFinder(ClassLoaderFinder finder)
          Set the classloader finder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected static BytecodeTypeInfoFactoryImpl delegate
The delegate

Constructor Detail

BytecodeTypeInfoFactory

public BytecodeTypeInfoFactory()
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

getClassLoaderFinder

public ClassLoaderFinder getClassLoaderFinder()
Get the classloader finder

Returns:
the classloader finder

setClassLoaderFinder

public void setClassLoaderFinder(ClassLoaderFinder finder)
Set the classloader finder

Parameters:
the - classloader finder. If null is passed in ClassLoaderFinder.Default is used

JBoss Reflection 2.2.1.SP1

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