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