Top Description Constructors Methods
io.smallrye.common.classloader

public Class ClassDefiner

extends Object
Class Inheritance
Annotations
@SuppressWarnings:removal
Imports
java.lang.invoke.MethodHandles, java.security.AccessController, .PrivilegedAction

A utility to define classes within a target lookup.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Class<?>

Returns:

the defined class (not null)
defineClass
(MethodHandles.Lookup
the lookup of the class (must not be null)
lookup
,
Class<?>
the host class to define the new class to (must not be null)
parent
,
String
the name of the new class (must not be null)
className
,
byte[]
the bytes of the new class (must not be null)
classBytes
)

Define a class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ClassDefinerback to summary
private ClassDefiner()

Method Detail

defineClassback to summary
public static Class<?> defineClass(MethodHandles.Lookup lookup, Class<?> parent, String className, byte[] classBytes)

Define a class.

Parameters
lookup:MethodHandles.Lookup

the lookup of the class (must not be null)

parent:Class<?>

the host class to define the new class to (must not be null)

className:String

the name of the new class (must not be null)

classBytes:byte[]

the bytes of the new class (must not be null)

Returns:Class<?>

the defined class (not null)