Top Description Fields Constructors Methods
org.glassfish.pfl.dynamic.codegen.impl

public Class CodeGeneratorUtil

extends Object
Class Inheritance
Imports
java.security.AccessController, .PrivilegedAction, org.glassfish.pfl.basic.reflection.Bridge

Class used to get a class directly from code generated by a runtime code generator. The code generator extends this base class, and must implement the getClassData method. Most of this is independent of BCEL, but finalizeMethod is specific to the BCEL framework.

Field Summary

Modifier and TypeField and Description
private static final Bridge
pack-priv static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Class<?>

Returns:

a newly created class
makeClass
(String
the name of the class to define
name
,
byte[]
the byte-code definition of the new class
def
,
Class<?>
an existing class in the desired classloader
anchorClass
)

Defines a class in the same classloader as a specified "anchor" class

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BRIDGE_REFback to summary
private static final Bridge BRIDGE_REF
CONSTRUCTOR_METHOD_NAMEback to summary
pack-priv static final String CONSTRUCTOR_METHOD_NAME

Constructor Detail

CodeGeneratorUtilback to summary
private CodeGeneratorUtil()

Method Detail

makeClassback to summary
public static Class<?> makeClass(String name, byte[] def, Class<?> anchorClass)

Defines a class in the same classloader as a specified "anchor" class

Parameters
name:String

the name of the class to define

def:byte[]

the byte-code definition of the new class

anchorClass:Class<?>

an existing class in the desired classloader

Returns:Class<?>

a newly created class