@InternalApi public class NativeImageUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Method |
getMethodOrFail(Class<?> clazz,
String methodName,
Class<?>... params)
Returns the method of a class or fails if it is not present.
|
static void |
registerClassForReflection(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String name)
Registers an entire class for reflection use.
|
static void |
registerClassHierarchyForReflection(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String className)
Registers the transitive class hierarchy of the provided
className for reflection. |
static void |
registerConstructorsForReflection(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String name)
Registers all constructors of a class for reflection.
|
static void |
registerForReflectiveInstantiation(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String className)
Registers a class for reflective construction via its default constructor.
|
static void |
registerForUnsafeFieldAccess(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String className,
String... fields)
Registers a class for unsafe reflective field access.
|
public static Method getMethodOrFail(Class<?> clazz, String methodName, Class<?>... params)
public static void registerForReflectiveInstantiation(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String className)
public static void registerConstructorsForReflection(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String name)
public static void registerClassForReflection(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String name)
public static void registerClassHierarchyForReflection(org.graalvm.nativeimage.hosted.Feature.FeatureAccess access,
String className)
className for reflection.
The transitive class hierarchy contains the class itself and its transitive set of *non-private* nested subclasses.