public class FactoryHelper extends Object
ProxyFactory.
 The users of ProxyFactory do not have to see this class.ProxyFactory| Modifier and Type | Field and Description | 
|---|---|
| static int[] | dataSizeThe data size of primitive types. | 
| static Class[] | primitiveTypesClassobjects representing primitive types. | 
| static String[] | unwarpMethodsThe names of methods for obtaining a primitive value
 from a wrapper object. | 
| static String[] | unwrapDescThe descriptors of the unwrapping methods contained
 in  unwrapMethods. | 
| static String[] | wrapperDescThe descriptors of the constructors of wrapper classes. | 
| static String[] | wrapperTypesThe fully-qualified names of wrapper classes for primitive types. | 
| Constructor and Description | 
|---|
| FactoryHelper() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Class | toClass(ClassFile cf,
       ClassLoader loader)Loads a class file by a given class loader. | 
| static Class | toClass(ClassFile cf,
       ClassLoader loader,
       ProtectionDomain domain)Loads a class file by a given class loader. | 
| static int | typeIndex(Class type)Returns an index for accessing arrays in this class. | 
| static void | writeFile(ClassFile cf,
         String directoryName)Writes a class file. | 
public static final Class[] primitiveTypes
Class objects representing primitive types.public static final String[] wrapperTypes
public static final String[] wrapperDesc
public static final String[] unwarpMethods
intValue()
 is such a method for obtaining an integer value from a
 java.lang.Integer object.public static final String[] unwrapDesc
unwrapMethods.public static final int[] dataSize
long
 and double are 2; the others are 1.public static final int typeIndex(Class type)
RuntimeException - if a given type is not a primitive type.public static Class toClass(ClassFile cf, ClassLoader loader) throws CannotCompileException
CannotCompileExceptiontoClass(ClassFile,ClassLoader,ProtectionDomain)public static Class toClass(ClassFile cf, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException
domain - if it is null, a default domain is used.CannotCompileExceptionpublic static void writeFile(ClassFile cf, String directoryName) throws CannotCompileException
CannotCompileExceptionCopyright © 2016 Shigeru Chiba, www.javassist.org. All Rights Reserved.