public class Hacks
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Hacks.CallStrategy |
| Constructor and Description |
|---|
Hacks() |
| Modifier and Type | Method and Description |
|---|---|
static <V> boolean |
addToCollectionField(java.lang.String field,
java.util.Collection<V> values,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter)
Returns true if any of the values were added.
|
static <V> boolean |
addToCollectionField(java.lang.String field,
java.util.Collection<V> values,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter,
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Collection<V>> afterAdd)
Returns true if the value was added.
|
static <V> boolean |
addToCollectionField(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter)
Returns true if the value was added.
|
static <V> boolean |
addToCollectionField(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter,
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Collection<V>> afterAdd)
Returns true if the value was added.
|
static <K,V> V |
addToMapField(java.lang.String field,
K key,
V value,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter)
Returns the previous value associated with the key or null if the map did not contain the key.
|
static <K,V> V |
addToMapField(java.lang.String field,
K key,
V value,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter,
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Map<K,V>> afterAdd)
Returns the previous value associated with the key or null if the map did not contain the key.
|
static <T> T |
callOnOtherClassLoader(java.lang.ClassLoader loader,
java.lang.String method,
java.lang.Class<?>[] argClasses,
java.lang.Object... args) |
static <T> T |
callOnOtherClassLoader(java.lang.ClassLoader loader,
java.lang.String method,
java.lang.Object... args) |
static void |
checkBurningWaveInit()
Check if BurningWave has been initialized and set the default properties if not
|
static void |
checkBurningWaveInit(boolean disableWarning)
Check if BurningWave has been initialized and set the default properties if not.
|
static <T> T |
checkBurningWaveInitAndCall(boolean disableWarning,
java.lang.String method,
java.lang.Object... args)
Ensuring BurningWave has been initialized before calling a Hacks method.
|
static <T> T |
checkBurningWaveInitAndCall(java.lang.String method,
java.lang.Object... args)
Ensuring BurningWave has been initialized before calling a Hacks method
|
static <T> T |
construct(java.lang.Class<T> target,
java.lang.Object... args)
Instantiates the target class using the given args
|
static <T> T |
construct(java.lang.String targetClass,
java.lang.Object... args)
Finds and instantiates the target class using the given args
|
static <T> T |
constructAndCast(java.lang.Class<?> target,
java.lang.Object... args)
Instantiates the target generic class using the given args
|
static <T> T |
constructDirect(java.lang.Class<?> target,
java.lang.Object... args)
Instantiates the target class using the given args
Constructing a class directly will bypass any package-private, private, or protected access restrictions.
|
static <T> T |
constructDirect(java.lang.Class<?> reference,
java.lang.String targetClass,
java.lang.Object... args)
Finds the target class via the reference class and instantiates it using the given args
Constructing a class directly will bypass any package-private, private, or protected access restrictions.
|
static <T> T |
constructDirect(java.lang.String targetClass,
java.lang.Object... args)
Finds and instantiates the target class using the given args
Constructing a class directly will bypass any package-private, private, or protected access restrictions.
|
static <T> T |
constructFromReference(java.lang.Class<?> reference,
java.lang.String targetClass,
java.lang.Object... args)
Finds the target class via the reference class and instantiates it using the given args
|
static <T> T |
constructWithLoader(java.lang.String target,
java.lang.ClassLoader loader,
java.lang.Object... args)
Finds and instantiates the target class on the target class loader using the given args
|
static java.lang.ClassLoader |
contextClassLoader() |
static java.lang.Class<?> |
defaultCaller() |
static <T> java.lang.Class<T> |
defineClass(java.lang.ClassLoader loader,
java.lang.String name,
@Nullable java.nio.ByteBuffer buffer)
Defines and resolves a class from byteCode
|
static <T> @Nullable java.lang.Class<T> |
findClass(@Nullable java.lang.Class<?> reference,
java.lang.String target)
Uses a reference class to find and return the target class in the same package as the reference class.
|
static <T> @Nullable java.lang.Class<T> |
findClass(@Nullable java.lang.Package pkg,
java.lang.String target)
Find and return the target class in given package
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target)
Finds and returns a Class object with the target name.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
boolean initialize)
Finds and returns a Class object with the target name using the given ClassLoader.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
java.lang.Class<?> caller)
Finds and returns a Class object with the target name using the given caller class.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
java.lang.Class<?> caller,
boolean initialize)
Finds and returns a Class object with the target name using the given caller class.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
java.lang.ClassLoader loader)
Finds and returns a Class object with the target name using the given ClassLoader.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
java.lang.ClassLoader loader,
boolean initialize)
Finds and returns a Class object with the target name using the given ClassLoader.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
java.lang.ClassLoader loader,
java.lang.Class<?> caller)
Finds and returns a Class object with the target name using the given ClassLoader and the given caller class.
|
static <T> @Nullable java.lang.Class<T> |
findClass(java.lang.String target,
java.lang.ClassLoader loader,
java.lang.Class<?> caller,
boolean initialize)
Finds and returns a Class object with the target name using the given ClassLoader and the given caller class.
|
static <T> @Nullable java.lang.Class<T> |
findClass(@Nullable java.lang.String pkg,
java.lang.String target)
Find and return the target class in given package name
|
static java.lang.Class<?> |
findClassInHeirarchy(java.lang.String name,
java.lang.ClassLoader loader) |
static java.lang.Class<?> |
findClassInHeirarchy(java.lang.String name,
java.lang.ClassLoader loader,
boolean initialize) |
static @Nullable java.lang.reflect.Method |
findMethodObj(java.lang.Class<?> c,
java.lang.String methodName,
java.lang.Class<?>... argTypes) |
static @Nullable java.nio.ByteBuffer |
getByteCode(java.lang.Class<?> clazz) |
static <T> T |
getField(java.lang.Object target,
java.lang.String field)
Returns a non-static field instance of the given name on the given object.
|
static <T> T |
getField(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary)
Returns a non-static field instance of the given name on the given object.
|
static <E> java.util.Collection<E> |
getFieldCollection(java.lang.Object instance,
java.lang.String getter,
java.lang.String field) |
static <E> java.util.Collection<E> |
getFieldCollectionWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
Finds a collection field with the input name and wraps it in an ArrayList.
|
static <E> java.util.Collection<E> |
getFieldCollectionWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field,
java.util.function.Function<java.util.Collection<E>,java.util.Collection<E>> wrapper)
Finds a collection field with the input name and wraps it with the input wrapper.
|
static <T> T |
getFieldDirect(java.lang.Object target,
java.lang.String field)
Returns a non-static field instance of the given name on the given object.
|
static <T> T |
getFieldDirect(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary)
Returns a non-static field instance of the given name on the given object.
|
static <E> java.util.List<E> |
getFieldList(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
Gets a field as a nonnulll List.
|
static <E> java.util.List<E> |
getFieldListWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
Finds a collection field with the input name and wraps it in an ArrayList.
|
static <K,V> java.util.Map<K,V> |
getFieldMap(java.lang.Object target,
java.lang.String getter,
java.lang.String field)
Gets a field as a nonnulll Map.
|
static <K,V> java.util.Map<K,V> |
getFieldMapWrapped(java.lang.Object target,
java.lang.String getter,
java.lang.String field)
Gets a field as a nonnulll Map.
|
static <E> java.util.Set<E> |
getFieldSet(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
Gets a field as a nonnulll List.
|
static <E> java.util.Set<E> |
getFieldSetWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
Finds a collection field with the input name and wraps it in an ArrayList.
|
static <T> T |
getFieldStatic(java.lang.Class<?> target,
java.lang.String field)
Returns a static field instance of the given name in the target class.
|
static <T> T |
getFieldStatic(java.lang.String targetClass,
java.lang.String field)
Finds the target class and returns a static field instance of the given name in it.
|
static <T> T |
getFieldStaticDirect(java.lang.Class<?> target,
java.lang.String field)
Returns a static field instance of the given name in the target class.
|
static <T> T |
getFieldStaticDirect(java.lang.String targetClass,
java.lang.String field)
Finds the target class and returns a static field instance of the given name in it.
|
static <T> T |
getFieldStaticDirectNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary)
Returns a static field instance of the given name in the target class.
|
static <T> T |
getFieldStaticDirectNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary)
Finds the target class and returns a static field instance of the given name in it.
|
static <T> T |
getFieldStaticNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary)
Returns a static field instance of the given name in the target class.
|
static <T> T |
getFieldStaticNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary)
Finds the target class and returns a static field instance of the given name in it.
|
static <T> T |
getRecordField(java.lang.Object target,
java.lang.String field)
Returns the instance of a record field assuming the call is valid and the field exists.
|
static <T> T |
getRecordFieldStatic(java.lang.Class<?> target,
java.lang.String field)
Returns the instance of a static record field assuming the call is valid and the field exists.
|
static <T> T |
invoke(java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
Invoke a non-static method of the given name on the given object with the given args.
|
static <T> T |
invokeDefault(java.lang.String hacksMethod,
T defVal,
java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
Double-layer invoke that returns the default value when the wrapped invoke returns null.
|
static <T> T |
invokeDefault(T defVal,
java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
Double-layer invoke that returns the default value when the wrapped invoke returns null.
|
static <T> T |
invokeDirect(java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
Invoke a non-static method of the given name on the given object with the given args.
|
static <T> T |
invokeDirectNamed(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
Invoke a non-static method of the given name on the given object with the given args.
|
static <T> T |
invokeMethodObj(java.lang.Class<?> target,
java.util.function.Function<java.lang.Class<?>,java.lang.reflect.Method> methodFinder,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(java.lang.Class<?> targetClass,
@Nullable java.lang.Object target,
java.util.function.Function<java.lang.Class<?>,java.lang.reflect.Method> methodFinder,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(java.lang.Class<?> targetClass,
@Nullable java.lang.Object target,
java.lang.String methodName,
java.lang.Class<?>[] argTypes,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(java.lang.Class<?> targetClass,
@Nullable java.lang.Object target,
java.lang.String methodName,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(java.lang.Class<?> target,
java.lang.String methodName,
java.lang.Class<?>[] argTypes,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(java.lang.Class<?> target,
java.lang.String methodName,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(@Nullable java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Object... args) |
static <T> T |
invokeMethodObj(java.lang.Object target,
java.lang.String methodName,
java.lang.Object... args) |
static <T> T |
invokeNamed(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
Invoke a non-static method of the given name on the given object with the given args.
|
static <T> T |
invokeOnComponent(java.lang.String componentName,
java.lang.String method,
java.lang.Object... args) |
static <T> T |
invokeStatic(java.lang.Class<?> target,
java.lang.String method,
java.lang.Object... args)
Invoke a static method of the given name in the target class with the given args.
|
static <T> T |
invokeStatic(java.lang.String targetClass,
java.lang.String method,
java.lang.Object... args)
Finds the target class and invokes a static method of the given name in it with the given args.
|
static <T> T |
invokeStaticDirect(java.lang.Class<?> target,
java.lang.String method,
java.lang.Object... args)
Invoke a static method of the given name in the target class with the given args.
|
static <T> T |
invokeStaticDirect(java.lang.String targetClass,
java.lang.String method,
java.lang.Object... args)
Finds the target class and invokes a static method of the given name in it with the given args.
|
static <T> T |
invokeStaticDirectNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
Invoke a static method of the given name in the target class with the given args.
|
static <T> T |
invokeStaticDirectNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
Finds the target class and invokes a static method of the given name in it with the given args.
|
static <T> T |
invokeStaticMethodObj(java.lang.reflect.Method method,
java.lang.Object... args) |
static <T> T |
invokeStaticNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
Invoke a static method of the given name in the target class with the given args.
|
static <T> T |
invokeStaticNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
Finds the target class and invokes a static method of the given name in it with the given args.
|
static boolean |
isNamedEnv()
Returns true if this is a named environment (for reflection purposes).
|
static boolean |
isSrgEnv()
Returns true if this is a srg environment (for reflection purposes).
|
static <T> java.lang.Class<T> |
loadOrDefineClass(java.lang.Class<T> c,
java.lang.ClassLoader loader) |
static <V> boolean |
removeCollectionFieldValue(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter)
Returns true if the value was removed
|
static <V> boolean |
removeCollectionFieldValue(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter,
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Collection<V>> afterRemove)
Returns true if the value was removed
|
static void |
removeEnvironmentProperty(java.lang.String property) |
static void |
removeEnvironmentProperty(java.lang.String property,
boolean removeFromAll) |
static <K,V> V |
removeMapFieldKey(java.lang.String field,
K key,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter)
Assumes the map field is modifiable
|
static <K,V> V |
removeMapFieldKey(java.lang.String field,
K key,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter,
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Map<K,V>> afterRemove)
Returns null if the map did not contain the key
|
static void |
setField(java.lang.Object target,
java.lang.String field,
java.lang.Object value) |
static void |
setFieldDirect(java.lang.Object target,
java.lang.String field,
java.lang.Object value) |
static void |
setFieldStatic(java.lang.Class<?> target,
java.lang.String field,
java.lang.Object value) |
static void |
setFieldStatic(java.lang.String targetName,
java.lang.String field,
java.lang.Object value) |
static void |
setFieldStaticDirect(java.lang.Class<?> target,
java.lang.String field,
java.lang.Object value) |
static void |
setFieldStaticDirect(java.lang.String targetName,
java.lang.String field,
java.lang.Object value) |
static java.nio.ByteBuffer |
toByteBuffer(java.io.InputStream stream) |
public static <V> boolean addToCollectionField(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter)
public static <V> boolean addToCollectionField(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter,
@Nullable
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Collection<V>> afterAdd)
public static <V> boolean addToCollectionField(java.lang.String field,
java.util.Collection<V> values,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter)
public static <V> boolean addToCollectionField(java.lang.String field,
java.util.Collection<V> values,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter,
@Nullable
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Collection<V>> afterAdd)
public static <K,V> V addToMapField(java.lang.String field,
K key,
V value,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter)
public static <K,V> V addToMapField(java.lang.String field,
K key,
V value,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter,
@Nullable
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Map<K,V>> afterAdd)
public static <T> T callOnOtherClassLoader(java.lang.ClassLoader loader,
java.lang.String method,
java.lang.Object... args)
public static <T> T callOnOtherClassLoader(java.lang.ClassLoader loader,
java.lang.String method,
java.lang.Class<?>[] argClasses,
java.lang.Object... args)
public static void checkBurningWaveInit()
public static void checkBurningWaveInit(boolean disableWarning)
public static <T> T checkBurningWaveInitAndCall(java.lang.String method,
java.lang.Object... args)
public static <T> T checkBurningWaveInitAndCall(boolean disableWarning,
java.lang.String method,
java.lang.Object... args)
public static <T> T construct(java.lang.String targetClass,
java.lang.Object... args)
public static <T> T construct(java.lang.Class<T> target,
java.lang.Object... args)
public static <T> T constructAndCast(java.lang.Class<?> target,
java.lang.Object... args)
public static <T> T constructDirect(java.lang.String targetClass,
java.lang.Object... args)
public static <T> T constructDirect(java.lang.Class<?> reference,
java.lang.String targetClass,
java.lang.Object... args)
public static <T> T constructDirect(java.lang.Class<?> target,
java.lang.Object... args)
public static <T> T constructFromReference(java.lang.Class<?> reference,
java.lang.String targetClass,
java.lang.Object... args)
public static <T> T constructWithLoader(java.lang.String target,
java.lang.ClassLoader loader,
java.lang.Object... args)
public static java.lang.ClassLoader contextClassLoader()
public static java.lang.Class<?> defaultCaller()
public static <T> java.lang.Class<T> defineClass(java.lang.ClassLoader loader,
java.lang.String name,
@Nullable
@Nullable java.nio.ByteBuffer buffer)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
java.lang.ClassLoader loader,
java.lang.Class<?> caller,
boolean initialize)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
java.lang.Class<?> caller,
boolean initialize)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
java.lang.Class<?> caller)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
java.lang.ClassLoader loader,
java.lang.Class<?> caller)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
java.lang.ClassLoader loader,
boolean initialize)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
java.lang.ClassLoader loader)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target,
boolean initialize)
@Nullable public static <T> @Nullable java.lang.Class<T> findClass(java.lang.String target)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(@Nullable
@Nullable java.lang.Class<?> reference,
java.lang.String target)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(@Nullable
@Nullable java.lang.Package pkg,
java.lang.String target)
@Nullable
public static <T> @Nullable java.lang.Class<T> findClass(@Nullable
@Nullable java.lang.String pkg,
java.lang.String target)
public static java.lang.Class<?> findClassInHeirarchy(java.lang.String name,
java.lang.ClassLoader loader)
public static java.lang.Class<?> findClassInHeirarchy(java.lang.String name,
java.lang.ClassLoader loader,
boolean initialize)
@Nullable
public static @Nullable java.lang.reflect.Method findMethodObj(java.lang.Class<?> c,
java.lang.String methodName,
java.lang.Class<?>... argTypes)
@Nullable public static @Nullable java.nio.ByteBuffer getByteCode(java.lang.Class<?> clazz)
public static <T> T getField(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary)
public static <T> T getField(java.lang.Object target,
java.lang.String field)
public static <E> java.util.Collection<E> getFieldCollection(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
public static <E> java.util.Collection<E> getFieldCollectionWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
public static <E> java.util.Collection<E> getFieldCollectionWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field,
java.util.function.Function<java.util.Collection<E>,java.util.Collection<E>> wrapper)
public static <T> T getFieldDirect(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary)
public static <T> T getFieldDirect(java.lang.Object target,
java.lang.String field)
public static <E> java.util.List<E> getFieldList(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
public static <E> java.util.List<E> getFieldListWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
public static <K,V> java.util.Map<K,V> getFieldMap(java.lang.Object target,
java.lang.String getter,
java.lang.String field)
public static <K,V> java.util.Map<K,V> getFieldMapWrapped(java.lang.Object target,
java.lang.String getter,
java.lang.String field)
public static <E> java.util.Set<E> getFieldSet(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
public static <E> java.util.Set<E> getFieldSetWrapped(java.lang.Object instance,
java.lang.String getter,
java.lang.String field)
public static <T> T getFieldStatic(java.lang.String targetClass,
java.lang.String field)
public static <T> T getFieldStatic(java.lang.Class<?> target,
java.lang.String field)
public static <T> T getFieldStaticDirect(java.lang.String targetClass,
java.lang.String field)
public static <T> T getFieldStaticDirect(java.lang.Class<?> target,
java.lang.String field)
public static <T> T getFieldStaticDirectNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary)
public static <T> T getFieldStaticDirectNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary)
public static <T> T getFieldStaticNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary)
public static <T> T getFieldStaticNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary)
public static <T> T getRecordField(java.lang.Object target,
java.lang.String field)
public static <T> T getRecordFieldStatic(java.lang.Class<?> target,
java.lang.String field)
public static <T> T invoke(java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeDefault(T defVal,
java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeDefault(java.lang.String hacksMethod,
T defVal,
java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeDirect(java.lang.Object target,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeDirectNamed(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Object target,
java.lang.String methodName,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Class<?> target,
java.lang.String methodName,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Class<?> targetClass,
@Nullable
@Nullable java.lang.Object target,
java.lang.String methodName,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Class<?> target,
java.lang.String methodName,
java.lang.Class<?>[] argTypes,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Class<?> targetClass,
@Nullable
@Nullable java.lang.Object target,
java.lang.String methodName,
java.lang.Class<?>[] argTypes,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Class<?> target,
java.util.function.Function<java.lang.Class<?>,java.lang.reflect.Method> methodFinder,
java.lang.Object... args)
public static <T> T invokeMethodObj(java.lang.Class<?> targetClass,
@Nullable
@Nullable java.lang.Object target,
java.util.function.Function<java.lang.Class<?>,java.lang.reflect.Method> methodFinder,
java.lang.Object... args)
public static <T> T invokeMethodObj(@Nullable
@Nullable java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Object... args)
public static <T> T invokeNamed(java.lang.Object target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
public static <T> T invokeOnComponent(java.lang.String componentName,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeStatic(java.lang.String targetClass,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeStatic(java.lang.Class<?> target,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeStaticDirect(java.lang.String targetClass,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeStaticDirect(java.lang.Class<?> target,
java.lang.String method,
java.lang.Object... args)
public static <T> T invokeStaticDirectNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
public static <T> T invokeStaticDirectNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
public static <T> T invokeStaticMethodObj(java.lang.reflect.Method method,
java.lang.Object... args)
public static <T> T invokeStaticNamed(java.lang.String targetClass,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
public static <T> T invokeStaticNamed(java.lang.Class<?> target,
java.lang.String named,
java.lang.String intermediary,
java.lang.Object... args)
public static boolean isNamedEnv()
public static boolean isSrgEnv()
public static <T> java.lang.Class<T> loadOrDefineClass(java.lang.Class<T> c,
java.lang.ClassLoader loader)
public static <V> boolean removeCollectionFieldValue(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter)
public static <V> boolean removeCollectionFieldValue(java.lang.String field,
V value,
java.util.function.Function<java.lang.String,java.util.Collection<V>> collectionGetter,
@Nullable
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Collection<V>> afterRemove)
public static void removeEnvironmentProperty(java.lang.String property)
public static void removeEnvironmentProperty(java.lang.String property,
boolean removeFromAll)
public static <K,V> V removeMapFieldKey(java.lang.String field,
K key,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter)
public static <K,V> V removeMapFieldKey(java.lang.String field,
K key,
java.util.function.Function<java.lang.String,java.util.Map<K,V>> mapGetter,
@Nullable
@Nullable java.util.function.BiConsumer<java.lang.String,java.util.Map<K,V>> afterRemove)
public static void setField(java.lang.Object target,
java.lang.String field,
java.lang.Object value)
public static void setFieldDirect(java.lang.Object target,
java.lang.String field,
java.lang.Object value)
public static void setFieldStatic(java.lang.String targetName,
java.lang.String field,
java.lang.Object value)
public static void setFieldStatic(java.lang.Class<?> target,
java.lang.String field,
java.lang.Object value)
public static void setFieldStaticDirect(java.lang.String targetName,
java.lang.String field,
java.lang.Object value)
public static void setFieldStaticDirect(java.lang.Class<?> target,
java.lang.String field,
java.lang.Object value)
public static java.nio.ByteBuffer toByteBuffer(java.io.InputStream stream)