Interface ClassDefiner
- All Known Implementing Classes:
SafeClassDefiner
public interface ClassDefiner
-
Method Summary
Modifier and TypeMethodDescriptiondefineClass
(@NotNull ClassLoader parentLoader, @NotNull String name, @org.jetbrains.annotations.NotNull byte[] data) Define a classstatic @NotNull ClassDefiner
default boolean
Returns if the defined classes can bypass access checks
-
Method Details
-
isBypassAccessChecks
default boolean isBypassAccessChecks()Returns if the defined classes can bypass access checks- Returns:
- if classes bypass access checks
-
defineClass
@NotNull @NotNull Class<?> defineClass(@NotNull @NotNull ClassLoader parentLoader, @NotNull @NotNull String name, @NotNull @org.jetbrains.annotations.NotNull byte[] data) Define a class- Parameters:
parentLoader
- the parent classloadername
- the name of the classdata
- the class data to load- Returns:
- the defined class
- Throws:
ClassFormatError
- if the class data is invalidNullPointerException
- if any of the arguments are null
-
getInstance
-