cn.zenliu.units.reflect.Ref Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of units-reflect Show documentation
Show all versions of units-reflect Show documentation
Reflect: enhance reflect tools
The newest version!
package cn.zenliu.units.reflect;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.SneakyThrows;
import lombok.ToString;
import lombok.experimental.Accessors;
import lombok.experimental.UtilityClass;
import java.lang.annotation.Annotation;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.invoke.VarHandle;
import java.lang.reflect.*;
import java.time.Duration;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* Ref port from other project
*
* @author Zen.Liu
* @since 2023-07-14
*/
@SuppressWarnings({"unchecked", "unused"})
public interface Ref {
E element();
//region Lazy
final class Lazy {
private volatile T v;
private volatile Supplier s;
public T get() {
if (s != null) synchronized (this) {
if (v != null) return v;
v = s.get();
s = null;
}
return v;
}
public Lazy(Supplier s) {
this.s = s;
}
}
final class LazyInt32 {
private volatile int v;
private volatile IntSupplier s;
public int get() {
if (s != null) synchronized (this) {
if (s == null) return v;
v = s.getAsInt();
s = null;
}
return v;
}
public LazyInt32(IntSupplier s) {
this.s = s;
}
//@formatter:off
public boolean eq(int v) {
return this.get() == v;
}
public boolean ne(int v) {
return this.get() != v;
}
public boolean gt(int v) {
return this.get() > v;
}
public boolean lt(int v) {
return this.get() < v;
}
public boolean ge(int v) {
return this.get() >= v;
}
public boolean le(int v) {
return this.get() <= v;
}
//@formatter:on
}
final class LazyInt64 {
private volatile long v;
private volatile LongSupplier s;
public long get() {
if (s != null) synchronized (this) {
if (s == null) return v;
v = s.getAsLong();
s = null;
}
return v;
}
public LazyInt64(LongSupplier s) {
this.s = s;
}
//@formatter:off
public boolean eq(long v) {
return this.get() == v;
}
public boolean ne(long v) {
return this.get() != v;
}
public boolean gt(long v) {
return this.get() > v;
}
public boolean lt(long v) {
return this.get() < v;
}
public boolean ge(long v) {
return this.get() >= v;
}
public boolean le(long v) {
return this.get() <= v;
}
//@formatter:on
}
final class LazyBool {
private volatile boolean v;
private volatile BooleanSupplier s;
public boolean get() {
if (s != null) synchronized (this) {
if (s == null) return v;
v = s.getAsBoolean();
s = null;
}
return v;
}
public LazyBool(BooleanSupplier s) {
this.s = s;
}
}
static LazyInt32 int32(IntSupplier s) {
return new LazyInt32(s);
}
static LazyInt64 int64(LongSupplier s) {
return new LazyInt64(s);
}
static LazyBool bool(BooleanSupplier s) {
return new LazyBool(s);
}
static Lazy lazy(Supplier s) {
return new Lazy<>(s);
}
//endregion
@SuppressWarnings("SpellCheckingInspection")
@UtilityClass
final class $ {
@Getter
@Accessors(fluent = true)
@AllArgsConstructor(staticName = "of")
final static class Pair {
final Object value;
final T element;
}
private static final long offset;
public static final int version;
public static final Map, Class>> BoxType;
public static final Map, Class>> UnboxType;
static class UnsafeAccess {
public static final boolean SUPPORTS_GET_AND_SET_REF = hasGetAndSetSupport();
public static final boolean SUPPORTS_GET_AND_ADD_LONG = hasGetAndAddLongSupport();
public static final sun.misc.Unsafe UNSAFE = getUnsafe();
public UnsafeAccess() {
}
@SuppressWarnings("RedundantCast")
private static sun.misc.Unsafe getUnsafe() {
sun.misc.Unsafe instance;
try {
Field field = sun.misc.Unsafe.class.getDeclaredField("theUnsafe");
field.setAccessible(true);
instance = (sun.misc.Unsafe) field.get((Object) null);
} catch (Exception var4) {
try {
Constructor c = sun.misc.Unsafe.class.getDeclaredConstructor();
c.setAccessible(true);
instance = (sun.misc.Unsafe) c.newInstance();
} catch (Exception var3) {
throw new RuntimeException(var3);
}
}
return instance;
}
private static boolean hasGetAndSetSupport() {
try {
sun.misc.Unsafe.class.getMethod("getAndSetObject", Object.class, Long.TYPE, Object.class);
return true;
} catch (Exception var1) {
return false;
}
}
private static boolean hasGetAndAddLongSupport() {
try {
sun.misc.Unsafe.class.getMethod("getAndAddLong", Object.class, Long.TYPE, Long.TYPE);
return true;
} catch (Exception var1) {
return false;
}
}
public static long fieldOffset(Class> clz, String fieldName) throws RuntimeException {
try {
return UNSAFE.objectFieldOffset(clz.getDeclaredField(fieldName));
} catch (NoSuchFieldException var3) {
throw new RuntimeException(var3);
}
}
}
static {
class AccessibleObjectLayout {
static final private String ACCESS_PERMISSION = "";
boolean override;
}
offset = UnsafeAccess.fieldOffset(AccessibleObjectLayout.class, "override");
var v = System.getProperty("java.version");
if (v.startsWith("1."))
version = Integer.parseInt(v.substring(2, 3));
else
version = Integer.parseInt(v.substring(0, v.indexOf(".")));
{
UnboxType = new HashMap, Class>>() {{
put(Void.class, Void.TYPE);
put(Boolean.class, Boolean.TYPE);
put(Integer.class, Integer.TYPE);
put(Short.class, Short.TYPE);
put(Byte.class, Byte.TYPE);
put(Long.class, Long.TYPE);
put(Character.class, Character.TYPE);
put(Float.class, Float.TYPE);
put(Double.class, Double.TYPE);
}};
}
{
BoxType = new HashMap, Class>>() {{
put(Void.class, Void.TYPE);
put(Boolean.TYPE, Boolean.class);
put(Integer.TYPE, Integer.class);
put(Short.TYPE, Short.class);
put(Byte.TYPE, Byte.class);
put(Long.TYPE, Long.class);
put(Character.TYPE, Character.class);
put(Float.TYPE, Float.class);
put(Double.TYPE, Double.class);
}};
}
}
/**
* @param c AccessibleObject
* @return accessible type
*/
public static T access(T c) {
try {
if (c == null) return null;
c.setAccessible(true);
return c;
} catch (Exception e) {
UnsafeAccess.UNSAFE.putBooleanVolatile(c, offset, true);
return c;
}
}
@SneakyThrows
public static Object invoke(Method m, Object self, Object... param) {
return m.invoke(self, param);
}
@SneakyThrows
public static Object invoke(MethodHandle m, Object self, Object... param) {
return m.bindTo(self).invokeWithArguments(param);
}
@SneakyThrows
public static Class> forName(String fqn) {
return Class.forName(fqn);
}
@SneakyThrows
public static Method declared(Class> type, String name, Class>... param) {
return type.getDeclaredMethod(name, param);
}
@SneakyThrows
public static Field declaredField(Class> type, String name) {
return type.getDeclaredField(name);
}
@SneakyThrows
public static Method declaredMethod0(Class> type, String name, Class>... parameters) {
for (var f : Class$getDeclaredMethods0.get().apply(type)) {
if (f.getName().equals(name) && Arrays.equals(f.getParameterTypes(), parameters)) {
return access(f);
}
}
throw new NoSuchMethodException(type.toString() + "#" + name + "" + Arrays.toString(parameters));
}
@SneakyThrows
public static Field declaredField0(Class> type, String name) {
for (var f : Class$getDeclaredFields0.get().apply(type)) {
if (f.getName().equals(name)) {
return access(f);
}
}
throw new NoSuchFieldException(type.toString() + "#" + name);
}
/**
* @param type the class
* @param param constructor parameters
* @return the find Constructor, or throw error
*/
@SneakyThrows
public static Constructor> declared(Class> type, Class>... param) {
return type.getDeclaredConstructor(param);
}
@SuppressWarnings("SpellCheckingInspection")
@SneakyThrows
public static MethodHandle unreflect(MethodHandles.Lookup lookup, Method m) {
return lookup.unreflect(m);
}
@SuppressWarnings("SpellCheckingInspection")
@SneakyThrows
public static MethodHandle unreflect(Method m) {
return lookup.unreflect(m);
}
@SneakyThrows
public static VarHandle unreflectVarhandle(Field m) {
return lookup.unreflectVarHandle(m);
}
@SneakyThrows
public static MethodHandle unreflectSpeical(Method m, Class> target) {
return lookup.unreflectSpecial(m, target);
}
@SneakyThrows
public static MethodHandle unreflectGetter(Field m) {
return lookup.unreflectGetter(m);
}
@SuppressWarnings("rawtypes")
@SneakyThrows
public static T instance(Constructor constructor, Object... args) {
return (T) constructor.newInstance(args);
}
public static final Lazy, MethodHandles.Lookup>> Lookup$Constructor = lazy(() -> {
var m = access(
version < 14 ? declared(MethodHandles.Lookup.class, Class.class, int.class)
//checked in OpenJDK repository changed in
// https://github.com/openjdk/jdk16/releases/tag/jdk-14-ga
: declared(MethodHandles.Lookup.class, Class.class, Class.class, int.class)
);
Objects.requireNonNull(m);
var mode = (
Modifier.PUBLIC
| Modifier.PRIVATE
| Modifier.PROTECTED
| Modifier.STATIC //PACKAGE
| (version >= (9) ? Modifier.STATIC << 1 : 0)// MODULE 9+
| (version >= (9) ? Modifier.STATIC << 2 : 0) //UNCONDITIONAL 9+
| (version >= (16) ? Modifier.STATIC << 3 : 0) //ORIGINAL 16+
);
return x -> (MethodHandles.Lookup) instance(m, x, null, mode);
});
public static final MethodHandles.Lookup lookup = Lookup$Constructor.get().apply(Ref.class);
//region 9+
Lazy, Object>> Class$getModule = lazy(() -> {
if (version <= 8) return x -> null;
var m = Objects.requireNonNull(access(declared(Class.class, "getModule")));
var h = unreflect(m);
return x -> invoke(h, x);
});
Lazy> Module$implAddExportsOrOpens = lazy(() -> {
if (version <= (8)) return (a, b) -> {
};
var cls = forName("java.lang.Module");
// var m = declared(cls, "implAddExportsOrOpens", void.class, String.class, cls, boolean.class, boolean.class);
var m = declaredMethod0(cls, "implAddExportsOrOpens", String.class, cls, boolean.class, boolean.class);
// var everyone = declaredField(cls, "EVERYONE_MODULE");
var everyone = getter(declaredField0(cls, "EVERYONE_MODULE")).invoke();
var h = unreflect(m);
return (pn, mod) -> invoke(h, mod, pn, everyone, true, true);
});
Lazy> Module$isNamed = lazy(() -> {
if (version <= (8)) return x -> false;
var m = declared(forName("java.lang.Module"), "isNamed", boolean.class);
var h = unreflect(m);
return x -> (boolean) invoke(h, x);
});
public static final LazyBool modular = bool(() -> {
if ($.version <= 8) return false;
return Module$isNamed.get().test(Class$getModule.get().apply(Ref.class));
});
//endregion
//region 12+
Lazy> Field$copy = lazy(() -> {
var copy = access(declared(Field.class, "copy"));
assert copy != null;
var h = unreflect(copy);
return x -> access((Field) invoke(h, x));
});
Lazy> Method$copy = lazy(() -> {
var copy = access(declared(Method.class, "copy"));
var h = unreflect(copy);
return x -> access((Method) invoke(h, x));
});
Lazy>> Constructor$Copy = lazy(() -> {
var copy = access(declared(Constructor.class, "copy"));
var h = unreflect(copy);
return x -> access((Constructor>) invoke(h, x));
});
Lazy, Field[]>> Class$getDeclaredFields0 = lazy(() -> {
var m = access(declared(Class.class, "getDeclaredFields0", boolean.class));
var h = unreflect(m);
var copy = Field$copy.get();
return x -> {
var f = (Field[]) invoke(h, x, false);
for (int i = 0; i < f.length; i++) {
f[i] = copy.apply(f[i]);
}
return f;
};
});
Lazy, Method[]>> Class$getDeclaredMethods0 = lazy(() -> {
var m = access(declared(Class.class, "getDeclaredMethods0", boolean.class));
var h = unreflect(m);
var copy = Method$copy.get();
return x -> {
var f = (Method[]) invoke(h, x, false);
for (int i = 0; i < f.length; i++) {
f[i] = copy.apply(f[i]);
}
return f;
};
});
Lazy, Class>[]>> Class$getDeclaredClasses0 = lazy(() -> {
var m = access(declared(Class.class, "getDeclaredClasses0"));
var h = unreflect(m);
return x -> {
try {
return (Class>[]) h.bindTo(x).invoke();
} catch (Throwable e) {
throw new RuntimeException(e);
}
};
});
Lazy, Constructor>[]>> Class$getDeclaredConstructors0 = lazy(() -> {
var m = access(declared(Class.class, "getDeclaredConstructors0", boolean.class));
var h = unreflect(m);
var copy = Constructor$Copy.get();
return x -> {
var f = (Constructor>[]) invoke(h, x, false);
for (int i = 0; i < f.length; i++) {
f[i] = copy.apply(f[i]);
}
return f;
};
});
//endregion
/**
* open module for everyone
*
* @param target target class in module
* @param pn package names
*/
public static void openModules(Class> target, String... pn) {
if (version <= 8) return;
var module = Class$getModule.get().apply(target);
for (String s : pn) {
Module$implAddExportsOrOpens.get().accept(s, module);
}
}
//region Caches
static final Cache> classes = Caffeine.newBuilder()
.initialCapacity(32)
.maximumSize(512)
.weakValues()
.expireAfterAccess(Duration.ofSeconds(60))
.build();
static final LoadingCache, Method[]> methods = Caffeine.newBuilder()
.initialCapacity(32)
.maximumSize(512)
.weakKeys()
.expireAfterAccess(Duration.ofSeconds(60))
.build($::findMethods);
static final LoadingCache, Field[]> fields = Caffeine.newBuilder()
.initialCapacity(32)
.maximumSize(512)
.weakKeys()
.expireAfterAccess(Duration.ofSeconds(60))
.build($::findFields);
static final LoadingCache, Constructor>[]> constructors = Caffeine.newBuilder()
.initialCapacity(32)
.maximumSize(512)
.weakKeys()
.expireAfterAccess(Duration.ofSeconds(60))
.build($::findConstructors);
//endregion
//region Finders
public static Method[] findMethods(Class> type) {
if (version >= 12) {
return Class$getDeclaredMethods0.get().apply(type);
}
return type.getDeclaredMethods();
}
public static Field[] findFields(Class> type) {
if (version >= 12) {
return Class$getDeclaredFields0.get().apply(type);
}
return type.getDeclaredFields();
}
public static Constructor>[] findConstructors(Class> type) {
if (version >= 12) {
return Class$getDeclaredConstructors0.get().apply(type);
}
return type.getDeclaredConstructors();
}
public static Field find(Class> declared, String name, Class> type) {
for (var v : fields.get(declared)) {
if (v.getName().equals(name)) {
if (type == null || type == v.getType()) return v;
}
}
return null;
}
public static Method find(Class> declared, String name, Class> returnType, Class>... parameters) {
for (var v : methods.get(declared)) {
if (v.getName().equals(name) && Arrays.equals(v.getParameterTypes(), parameters)) {
if (returnType == null || returnType == v.getReturnType()) return v;
}
}
return null;
}
public static Constructor> find(Class> declared, Class>... parameters) {
for (var v : constructors.get(declared)) {
if (Arrays.equals(v.getParameterTypes(), parameters)) {
return v;
}
}
return null;
}
//endregion
public static Method[] methods(Class> type) {
return methods.get(type);
}
public static Field[] fields(Class> type) {
return fields.get(type);
}
public static Constructor>[] constructors(Class> type) {
return constructors.get(type);
}
public static Class>[] declaredClasses(Class> type) {
return ($.version >= 9 ? $.Class$getDeclaredClasses0.get().apply(type) : type.getDeclaredClasses());
}
//region Delegates
@SuppressWarnings({"unused", "SpellCheckingInspection"})
interface KClass {
/**
* public final class java.lang.Class
**/
Lazy $Type = Ref.lazy(() -> Ref.type(Class.class));
/**
* private transient volatile java.lang.Class$AnnotationData java.lang.Class.annotationData
**/
Lazy AnnotationDataGetter = Ref.lazy(() -> $Type.get().findGetter("annotationData", Ref.type("java.lang.Class.AnnotationData").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy AnnotationDataSetter = Ref.lazy(() -> $Type.get().findSetter("annotationData", Ref.type("java.lang.Class.AnnotationData").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile sun.reflect.generics.repository.ClassRepository java.lang.Class.genericInfo
**/
Lazy GenericInfoGetter = Ref.lazy(() -> $Type.get().findGetter("genericInfo", Ref.type("sun.reflect.generics.repository.ClassRepository").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy GenericInfoSetter = Ref.lazy(() -> $Type.get().findSetter("genericInfo", Ref.type("sun.reflect.generics.repository.ClassRepository").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile java.util.Map java.lang.Class.enumConstantDirectory
**/
Lazy EnumConstantDirectoryGetter = Ref.lazy(() -> $Type.get().findGetter("enumConstantDirectory", Map.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy EnumConstantDirectorySetter = Ref.lazy(() -> $Type.get().findSetter("enumConstantDirectory", Map.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private final java.lang.Class> java.lang.Class.componentType
**/
Lazy ComponentTypeGetter = Ref.lazy(() -> $Type.get().findGetter("componentType", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ComponentTypeSetter = Ref.lazy(() -> $Type.get().findSetter("componentType", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static final int java.lang.Class.ENUM
**/
Lazy ENUMGetter = Ref.lazy(() -> $Type.get().findStaticGetter("ENUM", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ENUMSetter = Ref.lazy(() -> $Type.get().findStaticSetter("ENUM", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile int java.lang.Class.classRedefinedCount
**/
Lazy ClassRedefinedCountGetter = Ref.lazy(() -> $Type.get().findGetter("classRedefinedCount", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ClassRedefinedCountSetter = Ref.lazy(() -> $Type.get().findSetter("classRedefinedCount", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private final java.lang.ClassLoader java.lang.Class.classLoader
**/
Lazy ClassLoaderGetter = Ref.lazy(() -> $Type.get().findGetter("classLoader", ClassLoader.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ClassLoaderSetter = Ref.lazy(() -> $Type.get().findSetter("classLoader", ClassLoader.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile java.lang.reflect.Constructor java.lang.Class.cachedConstructor
**/
Lazy CachedConstructorGetter = Ref.lazy(() -> $Type.get().findGetter("cachedConstructor", Constructor.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy CachedConstructorSetter = Ref.lazy(() -> $Type.get().findSetter("cachedConstructor", Constructor.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient java.lang.Object java.lang.Class.classData
**/
Lazy ClassDataGetter = Ref.lazy(() -> $Type.get().findGetter("classData", Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ClassDataSetter = Ref.lazy(() -> $Type.get().findSetter("classData", Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient java.lang.Module java.lang.Class.module
**/
Lazy ModuleGetter = Ref.lazy(() -> $Type.get().findGetter("module", $Type.get().element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ModuleSetter = Ref.lazy(() -> $Type.get().findSetter("module", $Type.get().element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile sun.reflect.annotation.AnnotationType java.lang.Class.annotationType
**/
Lazy AnnotationTypeGetter = Ref.lazy(() -> $Type.get().findGetter("annotationType", Ref.type("sun.reflect.annotation.AnnotationType").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy AnnotationTypeSetter = Ref.lazy(() -> $Type.get().findSetter("annotationType", Ref.type("sun.reflect.annotation.AnnotationType").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static final int java.lang.Class.SYNTHETIC
**/
Lazy SYNTHETICGetter = Ref.lazy(() -> $Type.get().findStaticGetter("SYNTHETIC", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy SYNTHETICSetter = Ref.lazy(() -> $Type.get().findStaticSetter("SYNTHETIC", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile java.lang.ref.SoftReference> java.lang.Class.reflectionData
**/
Lazy ReflectionDataGetter = Ref.lazy(() -> $Type.get().findGetter("reflectionData", java.lang.ref.SoftReference.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ReflectionDataSetter = Ref.lazy(() -> $Type.get().findSetter("reflectionData", java.lang.ref.SoftReference.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* transient java.lang.ClassValue$ClassValueMap java.lang.Class.classValueMap
**/
Lazy ClassValueMapGetter = Ref.lazy(() -> $Type.get().findGetter("classValueMap", Ref.type("java.lang.ClassValue.ClassValueMap").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ClassValueMapSetter = Ref.lazy(() -> $Type.get().findSetter("classValueMap", Ref.type("java.lang.ClassValue.ClassValueMap").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static final java.io.ObjectStreamField[] java.lang.Class.serialPersistentFields
**/
Lazy SerialPersistentFieldsGetter = Ref.lazy(() -> $Type.get().findStaticGetter("serialPersistentFields", Ref.type("java.io.ObjectStreamField[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy SerialPersistentFieldsSetter = Ref.lazy(() -> $Type.get().findStaticSetter("serialPersistentFields", Ref.type("java.io.ObjectStreamField[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient volatile T[] java.lang.Class.enumConstants
**/
Lazy EnumConstantsGetter = Ref.lazy(() -> $Type.get().findGetter("enumConstants", Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy EnumConstantsSetter = Ref.lazy(() -> $Type.get().findSetter("enumConstants", Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static final int java.lang.Class.ANNOTATION
**/
Lazy ANNOTATIONGetter = Ref.lazy(() -> $Type.get().findStaticGetter("ANNOTATION", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ANNOTATIONSetter = Ref.lazy(() -> $Type.get().findStaticSetter("ANNOTATION", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient java.lang.String java.lang.Class.name
**/
Lazy NameGetter = Ref.lazy(() -> $Type.get().findGetter("name", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy NameSetter = Ref.lazy(() -> $Type.get().findSetter("name", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static jdk.internal.reflect.ReflectionFactory java.lang.Class.reflectionFactory
**/
Lazy ReflectionFactoryGetter = Ref.lazy(() -> $Type.get().findStaticGetter("reflectionFactory", Ref.type("jdk.internal.reflect.ReflectionFactory").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy ReflectionFactorySetter = Ref.lazy(() -> $Type.get().findStaticSetter("reflectionFactory", Ref.type("jdk.internal.reflect.ReflectionFactory").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private transient java.lang.String java.lang.Class.packageName
**/
Lazy PackageNameGetter = Ref.lazy(() -> $Type.get().findGetter("packageName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy PackageNameSetter = Ref.lazy(() -> $Type.get().findSetter("packageName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.security.ProtectionDomain java.lang.Class.allPermDomain
**/
Lazy AllPermDomainGetter = Ref.lazy(() -> $Type.get().findStaticGetter("allPermDomain", java.security.ProtectionDomain.class).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy AllPermDomainSetter = Ref.lazy(() -> $Type.get().findStaticSetter("allPermDomain", java.security.ProtectionDomain.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static final java.lang.Class>[] java.lang.Class.EMPTY_CLASS_ARRAY
**/
Lazy EMPTY_CLASS_ARRAYGetter = Ref.lazy(() -> $Type.get().findStaticGetter("EMPTY_CLASS_ARRAY", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
Lazy EMPTY_CLASS_ARRAYSetter = Ref.lazy(() -> $Type.get().findStaticSetter("EMPTY_CLASS_ARRAY", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Module java.lang.Class.getModule()
**/
Lazy GetModule = Ref.lazy(() -> $Type.get().handle("getModule", $Type.get().element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isSealed()
**/
Lazy IsSealed = Ref.lazy(() -> $Type.get().handle("isSealed", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.net.URL java.lang.Class.getResource(java.lang.String)
**/
Lazy GetResource = Ref.lazy(() -> $Type.get().handle("getResource", java.net.URL.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private boolean java.lang.Class.isLocalOrAnonymousClass()
**/
Lazy IsLocalOrAnonymousClass = Ref.lazy(() -> $Type.get().handle("isLocalOrAnonymousClass", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isLocalClass()
**/
Lazy IsLocalClass = Ref.lazy(() -> $Type.get().handle("isLocalClass", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isSynthetic()
**/
Lazy IsSynthetic = Ref.lazy(() -> $Type.get().handle("isSynthetic", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.getCanonicalName()
**/
Lazy GetCanonicalName = Ref.lazy(() -> $Type.get().handle("getCanonicalName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Method java.lang.Class.getMethod(java.lang.String,java.lang.Class>...) throws java.lang.NoSuchMethodException,java.lang.SecurityException
**/
Lazy GetMethod = Ref.lazy(() -> $Type.get().handle("getMethod", Method.class, String.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Method[] java.lang.Class.privateGetDeclaredMethods(boolean)
**/
Lazy PrivateGetDeclaredMethods = Ref.lazy(() -> $Type.get().handle("privateGetDeclaredMethods", Ref.type("java.lang.reflect.Method[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* java.util.List java.lang.Class.getDeclaredPublicMethods(java.lang.String,java.lang.Class>...)
**/
Lazy GetDeclaredPublicMethods = Ref.lazy(() -> $Type.get().handle("getDeclaredPublicMethods", List.class, String.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Field[] java.lang.Class.getDeclaredFields() throws java.lang.SecurityException
**/
Lazy GetDeclaredFields = Ref.lazy(() -> $Type.get().handle("getDeclaredFields", Ref.type("java.lang.reflect.Field[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.reflect.Constructor[] java.lang.Class.getDeclaredConstructors0(boolean)
**/
Lazy GetDeclaredConstructors0 = Ref.lazy(() -> $Type.get().handle("getDeclaredConstructors0", Ref.type("java.lang.reflect.Constructor[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public T java.lang.Class.cast(java.lang.Object)
**/
Lazy Cast = Ref.lazy(() -> $Type.get().handle("cast", Object.class, Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native boolean java.lang.Class.isInstance(java.lang.Object)
**/
Lazy IsInstance = Ref.lazy(() -> $Type.get().handle("isInstance", boolean.class, Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private boolean java.lang.Class.isDirectSubType(java.lang.Class>)
**/
Lazy IsDirectSubType = Ref.lazy(() -> $Type.get().handle("isDirectSubType", boolean.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Method java.lang.Class.getEnclosingMethod() throws java.lang.SecurityException
**/
Lazy GetEnclosingMethod = Ref.lazy(() -> $Type.get().handle("getEnclosingMethod", Method.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native java.lang.Object[] java.lang.Class.getSigners()
**/
Lazy GetSigners = Ref.lazy(() -> $Type.get().handle("getSigners", Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Constructor java.lang.Class.getConstructor0(java.lang.Class>[],int) throws java.lang.NoSuchMethodException
**/
Lazy GetConstructor0 = Ref.lazy(() -> $Type.get().handle("getConstructor0", Constructor.class, Ref.type("java.lang.Class[]").element(), int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Field[] java.lang.Class.privateGetPublicFields()
**/
Lazy PrivateGetPublicFields = Ref.lazy(() -> $Type.get().handle("privateGetPublicFields", Ref.type("java.lang.reflect.Field[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native boolean java.lang.Class.isInterface()
**/
Lazy IsInterface = Ref.lazy(() -> $Type.get().handle("isInterface", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.invoke.TypeDescriptor$OfField java.lang.Class.arrayType()
**/
Lazy ArrayType = Ref.lazy(() -> $Type.get().handle("arrayType", Ref.type("java.lang.invoke.TypeDescriptor.OfField").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class> java.lang.Class.arrayType()
**/
Lazy ArrayType1 = Ref.lazy(() -> $Type.get().handle("arrayType", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.lang.Class> java.lang.Class.toClass(java.lang.reflect.Type)
**/
Lazy ToClass = Ref.lazy(() -> $Type.get().findStatic("toClass", Class.class, java.lang.reflect.Type.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private boolean java.lang.Class.hasEnclosingMethodInfo()
**/
Lazy HasEnclosingMethodInfo = Ref.lazy(() -> $Type.get().handle("hasEnclosingMethodInfo", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* java.security.ProtectionDomain java.lang.Class.protectionDomain()
**/
Lazy ProtectionDomain = Ref.lazy(() -> $Type.get().handle("protectionDomain", java.security.ProtectionDomain.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class extends U> java.lang.Class.asSubclass(java.lang.Class)
**/
Lazy AsSubclass = Ref.lazy(() -> $Type.get().handle("asSubclass", Class.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Field java.lang.Class.getField(java.lang.String) throws java.lang.NoSuchFieldException,java.lang.SecurityException
**/
Lazy GetField = Ref.lazy(() -> $Type.get().handle("getField", Field.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.descriptorString()
**/
Lazy DescriptorString = Ref.lazy(() -> $Type.get().handle("descriptorString", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Constructor[] java.lang.Class.privateGetDeclaredConstructors(boolean)
**/
Lazy PrivateGetDeclaredConstructors = Ref.lazy(() -> $Type.get().handle("privateGetDeclaredConstructors", Ref.type("java.lang.reflect.Constructor[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Method[] java.lang.Class.privateGetPublicMethods()
**/
Lazy PrivateGetPublicMethods = Ref.lazy(() -> $Type.get().handle("privateGetPublicMethods", Ref.type("java.lang.reflect.Method[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static native java.lang.Class> java.lang.Class.forName0(java.lang.String,boolean,java.lang.ClassLoader,java.lang.Class>) throws java.lang.ClassNotFoundException
**/
Lazy ForName0 = Ref.lazy(() -> $Type.get().findStatic("forName0", Class.class, String.class, boolean.class, ClassLoader.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private boolean java.lang.Class.isTopLevelClass()
**/
Lazy IsTopLevelClass = Ref.lazy(() -> $Type.get().handle("isTopLevelClass", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.Class$ReflectionData java.lang.Class.newReflectionData(java.lang.ref.SoftReference>,int)
**/
Lazy NewReflectionData = Ref.lazy(() -> $Type.get().handle("newReflectionData", Ref.type("java.lang.Class.ReflectionData").element(), java.lang.ref.SoftReference.class, int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private boolean java.lang.Class.isOpenToCaller(java.lang.String,java.lang.Class>)
**/
Lazy IsOpenToCaller = Ref.lazy(() -> $Type.get().handle("isOpenToCaller", boolean.class, String.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.reflect.Method[] java.lang.Class.getDeclaredMethods0(boolean)
**/
Lazy GetDeclaredMethods0 = Ref.lazy(() -> $Type.get().handle("getDeclaredMethods0", Ref.type("java.lang.reflect.Method[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.RecordComponent[] java.lang.Class.getRecordComponents()
**/
Lazy GetRecordComponents = Ref.lazy(() -> $Type.get().handle("getRecordComponents", Ref.type("java.lang.reflect.RecordComponent[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class> java.lang.Class.getComponentType()
**/
Lazy GetComponentType = Ref.lazy(() -> $Type.get().handle("getComponentType", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native boolean java.lang.Class.isArray()
**/
Lazy IsArray = Ref.lazy(() -> $Type.get().handle("isArray", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native boolean java.lang.Class.isPrimitive()
**/
Lazy IsPrimitive = Ref.lazy(() -> $Type.get().handle("isPrimitive", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isAnnotation()
**/
Lazy IsAnnotation = Ref.lazy(() -> $Type.get().handle("isAnnotation", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Constructor>[] java.lang.Class.getDeclaredConstructors() throws java.lang.SecurityException
**/
Lazy GetDeclaredConstructors = Ref.lazy(() -> $Type.get().handle("getDeclaredConstructors", Ref.type("java.lang.reflect.Constructor[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isAnnotationPresent(java.lang.Class extends java.lang.annotation.Annotation>)
**/
Lazy IsAnnotationPresent = Ref.lazy(() -> $Type.get().handle("isAnnotationPresent", boolean.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* sun.reflect.annotation.AnnotationType java.lang.Class.getAnnotationType()
**/
Lazy GetAnnotationType = Ref.lazy(() -> $Type.get().handle("getAnnotationType", Ref.type("sun.reflect.annotation.AnnotationType").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static native void java.lang.Class.registerNatives()
**/
Lazy RegisterNatives = Ref.lazy(() -> $Type.get().findStatic("registerNatives", void.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.Class$ReflectionData java.lang.Class.reflectionData()
**/
Lazy ReflectionData = Ref.lazy(() -> $Type.get().handle("reflectionData", Ref.type("java.lang.Class.ReflectionData").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native boolean java.lang.Class.isAssignableFrom(java.lang.Class>)
**/
Lazy IsAssignableFrom = Ref.lazy(() -> $Type.get().handle("isAssignableFrom", boolean.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Method[] java.lang.Class.getDeclaredMethods() throws java.lang.SecurityException
**/
Lazy GetDeclaredMethods = Ref.lazy(() -> $Type.get().handle("getDeclaredMethods", Ref.type("java.lang.reflect.Method[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class> java.lang.Class.getDeclaringClass() throws java.lang.SecurityException
**/
Lazy GetDeclaringClass = Ref.lazy(() -> $Type.get().handle("getDeclaringClass", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.String java.lang.Class.getCanonicalName0()
**/
Lazy GetCanonicalName0 = Ref.lazy(() -> $Type.get().handle("getCanonicalName0", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.String java.lang.Class.getSimpleBinaryName()
**/
Lazy GetSimpleBinaryName = Ref.lazy(() -> $Type.get().handle("getSimpleBinaryName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.toGenericString()
**/
Lazy ToGenericString = Ref.lazy(() -> $Type.get().handle("toGenericString", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.lang.reflect.Field[] java.lang.Class.copyFields(java.lang.reflect.Field[])
**/
Lazy CopyFields = Ref.lazy(() -> $Type.get().findStatic("copyFields", Ref.type("java.lang.reflect.Field[]").element(), Ref.type("java.lang.reflect.Field[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class>[] java.lang.Class.getClasses()
**/
Lazy GetClasses = Ref.lazy(() -> $Type.get().handle("getClasses", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* java.lang.Object java.lang.Class.getClassData()
**/
Lazy GetClassData = Ref.lazy(() -> $Type.get().handle("getClassData", Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.Class$AnnotationData java.lang.Class.annotationData()
**/
Lazy AnnotationData = Ref.lazy(() -> $Type.get().handle("annotationData", Ref.type("java.lang.Class.AnnotationData").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.String java.lang.Class.methodToString(java.lang.String,java.lang.Class>[])
**/
Lazy MethodToString = Ref.lazy(() -> $Type.get().handle("methodToString", String.class, String.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.invoke.TypeDescriptor$OfField java.lang.Class.componentType()
**/
Lazy ComponentType = Ref.lazy(() -> $Type.get().handle("componentType", type("java.lang.invoke.TypeDescriptor.OfField").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class> java.lang.Class.componentType()
**/
Lazy ComponentType1 = Ref.lazy(() -> $Type.get().handle("componentType", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public static java.lang.Class> java.lang.Class.forName(java.lang.String) throws java.lang.ClassNotFoundException
**/
Lazy ForName = Ref.lazy(() -> $Type.get().findStatic("forName", Class.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public static java.lang.Class> java.lang.Class.forName(java.lang.Module,java.lang.String)
**/
Lazy ForName1 = Ref.lazy(() -> $Type.get().findStatic("forName", Class.class, $Type.get().element(), String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public static java.lang.Class> java.lang.Class.forName(java.lang.String,boolean,java.lang.ClassLoader) throws java.lang.ClassNotFoundException
**/
Lazy ForName2 = Ref.lazy(() -> $Type.get().findStatic("forName", Class.class, String.class, boolean.class, ClassLoader.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.Class>[] java.lang.Class.getPermittedSubclasses0()
**/
Lazy GetPermittedSubclasses0 = Ref.lazy(() -> $Type.get().handle("getPermittedSubclasses0", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isRecord()
**/
Lazy IsRecord = Ref.lazy(() -> $Type.get().handle("isRecord", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Constructor java.lang.Class.getDeclaredConstructor(java.lang.Class>...) throws java.lang.NoSuchMethodException,java.lang.SecurityException
**/
Lazy GetDeclaredConstructor = Ref.lazy(() -> $Type.get().handle("getDeclaredConstructor", Constructor.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private sun.reflect.generics.factory.GenericsFactory java.lang.Class.getFactory()
**/
Lazy GetFactory = Ref.lazy(() -> $Type.get().handle("getFactory", Ref.type("sun.reflect.generics.factory.GenericsFactory").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.annotation.Annotation[] java.lang.Class.getAnnotations()
**/
Lazy GetAnnotations = Ref.lazy(() -> $Type.get().handle("getAnnotations", Ref.type("java.lang.annotation.Annotation[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.Class> java.lang.Class.getNestHost0()
**/
Lazy GetNestHost0 = Ref.lazy(() -> $Type.get().handle("getNestHost0", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Field java.lang.Class.getField0(java.lang.String)
**/
Lazy GetField0 = Ref.lazy(() -> $Type.get().handle("getField0", Field.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* native void java.lang.Class.setSigners(java.lang.Object[])
**/
Lazy SetSigners = Ref.lazy(() -> $Type.get().handle("setSigners", void.class, Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.String java.lang.Class.getSimpleName0()
**/
Lazy GetSimpleName0 = Ref.lazy(() -> $Type.get().handle("getSimpleName0", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.security.ProtectionDomain java.lang.Class.getProtectionDomain0()
**/
Lazy GetProtectionDomain0 = Ref.lazy(() -> $Type.get().handle("getProtectionDomain0", java.security.ProtectionDomain.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.Class> java.lang.Class.getDeclaringClass0()
**/
Lazy GetDeclaringClass0 = Ref.lazy(() -> $Type.get().handle("getDeclaringClass0", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public A[] java.lang.Class.getDeclaredAnnotationsByType(java.lang.Class)
**/
Lazy GetDeclaredAnnotationsByType = Ref.lazy(() -> $Type.get().handle("getDeclaredAnnotationsByType", Ref.type("java.lang.annotation.Annotation[]").element(), Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static void java.lang.Class.addAll(java.util.Collection,java.lang.reflect.Field[])
**/
Lazy AddAll = Ref.lazy(() -> $Type.get().findStatic("addAll", void.class, Collection.class, Ref.type("java.lang.reflect.Field[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* java.lang.ClassLoader java.lang.Class.getClassLoader0()
**/
Lazy GetClassLoader0 = Ref.lazy(() -> $Type.get().handle("getClassLoader0", ClassLoader.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.toString()
**/
Lazy ToString = Ref.lazy(() -> $Type.get().handle("toString", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Type java.lang.Class.getGenericSuperclass()
**/
Lazy GetGenericSuperclass = Ref.lazy(() -> $Type.get().handle("getGenericSuperclass", java.lang.reflect.Type.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* T[] java.lang.Class.getEnumConstantsShared()
**/
Lazy GetEnumConstantsShared = Ref.lazy(() -> $Type.get().handle("getEnumConstantsShared", Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.Class> java.lang.Class.elementType()
**/
Lazy ElementType = Ref.lazy(() -> $Type.get().handle("elementType", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* native byte[] java.lang.Class.getRawAnnotations()
**/
Lazy GetRawAnnotations = Ref.lazy(() -> $Type.get().handle("getRawAnnotations", byte[][].class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.Class>[] java.lang.Class.getNestMembers0()
**/
Lazy GetNestMembers0 = Ref.lazy(() -> $Type.get().handle("getNestMembers0", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.getName()
**/
Lazy GetName = Ref.lazy(() -> $Type.get().handle("getName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* static java.lang.String java.lang.Class.typeVarBounds(java.lang.reflect.TypeVariable>)
**/
Lazy TypeVarBounds = Ref.lazy(() -> $Type.get().findStatic("typeVarBounds", String.class, TypeVariable.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.lang.reflect.Method java.lang.Class.searchMethods(java.lang.reflect.Method[],java.lang.String,java.lang.Class>[])
**/
Lazy SearchMethods = Ref.lazy(() -> $Type.get().findStatic("searchMethods", Method.class, Ref.type("java.lang.reflect.Method[]").element(), String.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static native boolean java.lang.Class.desiredAssertionStatus0(java.lang.Class>)
**/
Lazy DesiredAssertionStatus0 = Ref.lazy(() -> $Type.get().findStatic("desiredAssertionStatus0", boolean.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native boolean java.lang.Class.isRecord0()
**/
Lazy IsRecord0 = Ref.lazy(() -> $Type.get().handle("isRecord0", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.util.Optional java.lang.Class.describeConstable()
**/
Lazy DescribeConstable = Ref.lazy(() -> $Type.get().handle("describeConstable", Optional.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isMemberClass()
**/
Lazy IsMemberClass = Ref.lazy(() -> $Type.get().handle("isMemberClass", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.PublicMethods$MethodList java.lang.Class.getMethodsRecursive(java.lang.String,java.lang.Class>[],boolean)
**/
Lazy GetMethodsRecursive = Ref.lazy(() -> $Type.get().handle("getMethodsRecursive", Ref.type("java.lang.PublicMethods.MethodList").element(), String.class, Ref.type("java.lang.Class[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.Object[] java.lang.Class.getEnclosingMethod0()
**/
Lazy GetEnclosingMethod0 = Ref.lazy(() -> $Type.get().handle("getEnclosingMethod0", Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class>[] java.lang.Class.getPermittedSubclasses()
**/
Lazy GetPermittedSubclasses = Ref.lazy(() -> $Type.get().handle("getPermittedSubclasses", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.lang.reflect.Constructor[] java.lang.Class.copyConstructors(java.lang.reflect.Constructor[])
**/
Lazy CopyConstructors = Ref.lazy(() -> $Type.get().findStatic("copyConstructors", Ref.type("java.lang.reflect.Constructor[]").element(), Ref.type("java.lang.reflect.Constructor[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.TypeVariable>[] java.lang.Class.getTypeParameters()
**/
Lazy GetTypeParameters = Ref.lazy(() -> $Type.get().handle("getTypeParameters", Ref.type("java.lang.reflect.TypeVariable[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static boolean java.lang.Class.arrayContentsEq(java.lang.Object[],java.lang.Object[])
**/
Lazy ArrayContentsEq = Ref.lazy(() -> $Type.get().findStatic("arrayContentsEq", boolean.class, Ref.type("java.lang.Object[]").element(), Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Package java.lang.Class.getPackage()
**/
Lazy GetPackage = Ref.lazy(() -> $Type.get().handle("getPackage", Package.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class> java.lang.Class.getNestHost()
**/
Lazy GetNestHost = Ref.lazy(() -> $Type.get().handle("getNestHost", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class>[] java.lang.Class.getInterfaces()
**/
Lazy GetInterfaces = Ref.lazy(() -> $Type.get().handle("getInterfaces", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.Class>[] java.lang.Class.getInterfaces(boolean)
**/
Lazy GetInterfaces1 = Ref.lazy(() -> $Type.get().handle("getInterfaces", Ref.type("java.lang.Class[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.AnnotatedType[] java.lang.Class.getAnnotatedInterfaces()
**/
Lazy GetAnnotatedInterfaces = Ref.lazy(() -> $Type.get().handle("getAnnotatedInterfaces", Ref.type("java.lang.reflect.AnnotatedType[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.lang.reflect.Method[] java.lang.Class.copyMethods(java.lang.reflect.Method[])
**/
Lazy CopyMethods = Ref.lazy(() -> $Type.get().findStatic("copyMethods", Ref.type("java.lang.reflect.Method[]").element(), Ref.type("java.lang.reflect.Method[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public T java.lang.Class.newInstance() throws java.lang.InstantiationException,java.lang.IllegalAccessException
**/
Lazy NewInstance = Ref.lazy(() -> $Type.get().handle("newInstance", Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.reflect.Field[] java.lang.Class.getDeclaredFields0(boolean)
**/
Lazy GetDeclaredFields0 = Ref.lazy(() -> $Type.get().handle("getDeclaredFields0", Ref.type("java.lang.reflect.Field[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static jdk.internal.reflect.ReflectionFactory java.lang.Class.getReflectionFactory()
**/
Lazy GetReflectionFactory = Ref.lazy(() -> $Type.get().findStatic("getReflectionFactory", Ref.type("jdk.internal.reflect.ReflectionFactory").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Field[] java.lang.Class.getFields() throws java.lang.SecurityException
**/
Lazy GetFields = Ref.lazy(() -> $Type.get().handle("getFields", Ref.type("java.lang.reflect.Field[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private sun.reflect.generics.repository.ClassRepository java.lang.Class.getGenericInfo()
**/
Lazy GetGenericInfo = Ref.lazy(() -> $Type.get().handle("getGenericInfo", Ref.type("sun.reflect.generics.repository.ClassRepository").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public A java.lang.Class.getAnnotation(java.lang.Class)
**/
Lazy GetAnnotation = Ref.lazy(() -> $Type.get().handle("getAnnotation", Annotation.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public A java.lang.Class.getDeclaredAnnotation(java.lang.Class)
**/
Lazy GetDeclaredAnnotation = Ref.lazy(() -> $Type.get().handle("getDeclaredAnnotation", Annotation.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.getSimpleName()
**/
Lazy GetSimpleName = Ref.lazy(() -> $Type.get().handle("getSimpleName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.getPackageName()
**/
Lazy GetPackageName = Ref.lazy(() -> $Type.get().handle("getPackageName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Method[] java.lang.Class.getMethods() throws java.lang.SecurityException
**/
Lazy GetMethods = Ref.lazy(() -> $Type.get().handle("getMethods", Ref.type("java.lang.reflect.Method[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/** private static void java.lang.Class.checkPackageAccessForPermittedSubclasses(java.lang.SecurityManager,java.lang.ClassLoader,java.lang.Class>[]) **/
//Ref.Lazy CheckPackageAccessForPermittedSubclasses=Ref.lazy(()->$Type.get().findStatic("checkPackageAccessForPermittedSubclasses",void.class,java.lang.SecurityManager.class,java.lang.ClassLoader.class,Ref.type("java.lang.Class[]").element()).orElseThrow(()->new IllegalStateException("No value present")));
/**
* public java.security.ProtectionDomain java.lang.Class.getProtectionDomain()
**/
Lazy GetProtectionDomain = Ref.lazy(() -> $Type.get().handle("getProtectionDomain", java.security.ProtectionDomain.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.Class>[] java.lang.Class.getInterfaces0()
**/
Lazy GetInterfaces0 = Ref.lazy(() -> $Type.get().handle("getInterfaces0", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.desiredAssertionStatus()
**/
Lazy DesiredAssertionStatus = Ref.lazy(() -> $Type.get().handle("desiredAssertionStatus", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* native jdk.internal.reflect.ConstantPool java.lang.Class.getConstantPool()
**/
Lazy GetConstantPool = Ref.lazy(() -> $Type.get().handle("getConstantPool", Ref.type("jdk.internal.reflect.ConstantPool").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class>[] java.lang.Class.getNestMembers()
**/
Lazy GetNestMembers = Ref.lazy(() -> $Type.get().handle("getNestMembers", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* java.util.Map, java.lang.annotation.Annotation> java.lang.Class.getDeclaredAnnotationMap()
**/
Lazy GetDeclaredAnnotationMap = Ref.lazy(() -> $Type.get().handle("getDeclaredAnnotationMap", Map.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* static native java.lang.Class> java.lang.Class.getPrimitiveClass(java.lang.String)
**/
Lazy GetPrimitiveClass = Ref.lazy(() -> $Type.get().findStatic("getPrimitiveClass", Class.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Type[] java.lang.Class.getGenericInterfaces()
**/
Lazy GetGenericInterfaces = Ref.lazy(() -> $Type.get().handle("getGenericInterfaces", Ref.type("java.lang.reflect.Type[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.ClassLoader java.lang.Class.getClassLoader()
**/
Lazy GetClassLoader = Ref.lazy(() -> $Type.get().handle("getClassLoader", ClassLoader.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.String java.lang.Class.getSimpleBinaryName0()
**/
Lazy GetSimpleBinaryName0 = Ref.lazy(() -> $Type.get().handle("getSimpleBinaryName0", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.annotation.Annotation[] java.lang.Class.getDeclaredAnnotations()
**/
Lazy GetDeclaredAnnotations = Ref.lazy(() -> $Type.get().handle("getDeclaredAnnotations", Ref.type("java.lang.annotation.Annotation[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* boolean java.lang.Class.casAnnotationType(sun.reflect.annotation.AnnotationType,sun.reflect.annotation.AnnotationType)
**/
Lazy CasAnnotationType = Ref.lazy(() -> $Type.get().handle("casAnnotationType", boolean.class, Ref.type("sun.reflect.annotation.AnnotationType").element(), Ref.type("sun.reflect.annotation.AnnotationType").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/** private void java.lang.Class.checkMemberAccess(java.lang.SecurityManager,int,java.lang.Class>,boolean) **/
//Ref.Lazy CheckMemberAccess=Ref.lazy(()->$Type.get().handle("checkMemberAccess",void.class,java.lang.SecurityManager.class,int.class,java.lang.Class.class,boolean.class).orElseThrow(()->new IllegalStateException("No value present")));
/**
* public A[] java.lang.Class.getAnnotationsByType(java.lang.Class)
**/
Lazy GetAnnotationsByType = Ref.lazy(() -> $Type.get().handle("getAnnotationsByType", Ref.type("java.lang.annotation.Annotation[]").element(), Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Constructor>[] java.lang.Class.getConstructors() throws java.lang.SecurityException
**/
Lazy GetConstructors = Ref.lazy(() -> $Type.get().handle("getConstructors", Ref.type("java.lang.reflect.Constructor[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.reflect.Field[] java.lang.Class.privateGetDeclaredFields(boolean)
**/
Lazy PrivateGetDeclaredFields = Ref.lazy(() -> $Type.get().handle("privateGetDeclaredFields", Ref.type("java.lang.reflect.Field[]").element(), boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.AnnotatedType java.lang.Class.getAnnotatedSuperclass()
**/
Lazy GetAnnotatedSuperclass = Ref.lazy(() -> $Type.get().handle("getAnnotatedSuperclass", AnnotatedType.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private static java.lang.reflect.Field java.lang.Class.searchFields(java.lang.reflect.Field[],java.lang.String)
**/
Lazy SearchFields = Ref.lazy(() -> $Type.get().findStatic("searchFields", Field.class, Ref.type("java.lang.reflect.Field[]").element(), String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native int java.lang.Class.getModifiers()
**/
Lazy GetModifiers = Ref.lazy(() -> $Type.get().handle("getModifiers", int.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.String java.lang.Class.getTypeName()
**/
Lazy GetTypeName = Ref.lazy(() -> $Type.get().handle("getTypeName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Constructor> java.lang.Class.getEnclosingConstructor() throws java.lang.SecurityException
**/
Lazy GetEnclosingConstructor = Ref.lazy(() -> $Type.get().handle("getEnclosingConstructor", Constructor.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isNestmateOf(java.lang.Class>)
**/
Lazy IsNestmateOf = Ref.lazy(() -> $Type.get().handle("isNestmateOf", boolean.class, Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.reflect.RecordComponent[] java.lang.Class.getRecordComponents0()
**/
Lazy GetRecordComponents0 = Ref.lazy(() -> $Type.get().handle("getRecordComponents0", Ref.type("java.lang.reflect.RecordComponent[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native java.lang.Class super T> java.lang.Class.getSuperclass()
**/
Lazy GetSuperclass = Ref.lazy(() -> $Type.get().handle("getSuperclass", Class.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String) throws java.lang.NoSuchFieldException,java.lang.SecurityException
**/
Lazy GetDeclaredField = Ref.lazy(() -> $Type.get().handle("getDeclaredField", Field.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* java.util.Map java.lang.Class.enumConstantDirectory()
**/
Lazy EnumConstantDirectory = Ref.lazy(() -> $Type.get().handle("enumConstantDirectory", Map.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.io.InputStream java.lang.Class.getResourceAsStream(java.lang.String)
**/
Lazy GetResourceAsStream = Ref.lazy(() -> $Type.get().handle("getResourceAsStream", java.io.InputStream.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.Class$EnclosingMethodInfo java.lang.Class.getEnclosingMethodInfo()
**/
Lazy GetEnclosingMethodInfo = Ref.lazy(() -> $Type.get().handle("getEnclosingMethodInfo", Ref.type("java.lang.Class.EnclosingMethodInfo").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Method java.lang.Class.getDeclaredMethod(java.lang.String,java.lang.Class>...) throws java.lang.NoSuchMethodException,java.lang.SecurityException
**/
Lazy GetDeclaredMethod = Ref.lazy(() -> $Type.get().handle("getDeclaredMethod", Method.class, String.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* native byte[] java.lang.Class.getRawTypeAnnotations()
**/
Lazy GetRawTypeAnnotations = Ref.lazy(() -> $Type.get().handle("getRawTypeAnnotations", byte[][].class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public boolean java.lang.Class.isEnum()
**/
Lazy IsEnum = Ref.lazy(() -> $Type.get().handle("isEnum", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.String java.lang.Class.cannotCastMsg(java.lang.Object)
**/
Lazy CannotCastMsg = Ref.lazy(() -> $Type.get().handle("cannotCastMsg", String.class, Object.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.reflect.Constructor java.lang.Class.getConstructor(java.lang.Class>...) throws java.lang.NoSuchMethodException,java.lang.SecurityException
**/
Lazy GetConstructor = Ref.lazy(() -> $Type.get().handle("getConstructor", Constructor.class, Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public T[] java.lang.Class.getEnumConstants()
**/
Lazy GetEnumConstants = Ref.lazy(() -> $Type.get().handle("getEnumConstants", Ref.type("java.lang.Object[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public native boolean java.lang.Class.isHidden()
**/
Lazy IsHidden = Ref.lazy(() -> $Type.get().handle("isHidden", boolean.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private native java.lang.String java.lang.Class.initClassName()
**/
Lazy InitClassName = Ref.lazy(() -> $Type.get().handle("initClassName", String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* private java.lang.String java.lang.Class.resolveName(java.lang.String)
**/
Lazy ResolveName = Ref.lazy(() -> $Type.get().handle("resolveName", String.class, String.class).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* public java.lang.Class>[] java.lang.Class.getDeclaredClasses() throws java.lang.SecurityException
**/
Lazy GetDeclaredClasses = Ref.lazy(() -> $Type.get().handle("getDeclaredClasses", Ref.type("java.lang.Class[]").element()).orElseThrow(() -> new NoSuchElementException("No value present")));
/**
* static byte[] java.lang.Class.getExecutableTypeAnnotationBytes(java.lang.reflect.Executable)
**/
Lazy