Class AbstractDefaultRulesReflectionProxy
java.lang.Object
io.papermc.reflectionrewriter.runtime.AbstractDefaultRulesReflectionProxy
- All Implemented Interfaces:
DefaultRulesReflectionProxy
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public abstract class AbstractDefaultRulesReflectionProxy
extends Object
implements DefaultRulesReflectionProxy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaltMetafactory(MethodHandles.Lookup caller, String interfaceMethodName, MethodType factoryType, Object... args) bind(MethodHandles.Lookup lookup, Object receiver, String name, MethodType type) fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) Class<?>findClass(MethodHandles.Lookup lookup, String targetName) findGetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) findSetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) findSpecial(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type, Class<?> specialCaller) findStatic(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type) findStaticGetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) findStaticSetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) findStaticVarHandle(MethodHandles.Lookup lookup, Class<?> decl, String name, Class<?> type) findVarHandle(MethodHandles.Lookup lookup, Class<?> recv, String name, Class<?> type) findVirtual(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type) Class<?>Class<?>Class<?>forName(String name, boolean initialize, ClassLoader loader) fromMethodDescriptorString(String descriptor, ClassLoader loader) getDeclaredField(Class<?> clazz, String name) getDeclaredMethod(Class<?> clazz, String name, Class<?>... parameterTypes) getStaticFinal(MethodHandles.Lookup lookup, String name, Class<?> type) getStaticFinal(MethodHandles.Lookup lookup, String name, Class<?> type, Class<?> declaringClass) protected abstract StringmapClassName(String name) protected final StringmapClassOrArrayName(String name) protected abstract StringmapDeclaredFieldName(Class<?> clazz, String name) protected abstract StringmapDeclaredMethodName(Class<?> clazz, String name, Class<?>... parameterTypes) protected abstract StringmapFieldName(Class<?> clazz, String name) protected abstract StringmapMethodName(Class<?> clazz, String name, Class<?>... parameterTypes) metafactory(MethodHandles.Lookup caller, String interfaceMethodName, MethodType factoryType, MethodType interfaceMethodType, MethodHandle implementation, MethodType dynamicMethodType) staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType)
-
Constructor Details
-
AbstractDefaultRulesReflectionProxy
protected AbstractDefaultRulesReflectionProxy()
-
-
Method Details
-
mapClassName
-
mapDeclaredMethodName
-
mapMethodName
-
mapDeclaredFieldName
-
mapFieldName
-
mapClassOrArrayName
-
forName
- Specified by:
forNamein interfaceDefaultRulesReflectionProxy- Throws:
ClassNotFoundException
-
forName
public Class<?> forName(String name, boolean initialize, ClassLoader loader) throws ClassNotFoundException - Specified by:
forNamein interfaceDefaultRulesReflectionProxy- Throws:
ClassNotFoundException
-
forName
- Specified by:
forNamein interfaceDefaultRulesReflectionProxy
-
getField
- Specified by:
getFieldin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionSecurityException
-
getDeclaredField
public Field getDeclaredField(Class<?> clazz, String name) throws NoSuchFieldException, SecurityException - Specified by:
getDeclaredFieldin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionSecurityException
-
getDeclaredMethod
public Method getDeclaredMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException - Specified by:
getDeclaredMethodin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchMethodExceptionSecurityException
-
getMethod
public Method getMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException - Specified by:
getMethodin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchMethodExceptionSecurityException
-
findStatic
public MethodHandle findStatic(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException - Specified by:
findStaticin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchMethodExceptionIllegalAccessException
-
findVirtual
public MethodHandle findVirtual(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException - Specified by:
findVirtualin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchMethodExceptionIllegalAccessException
-
findClass
public Class<?> findClass(MethodHandles.Lookup lookup, String targetName) throws ClassNotFoundException, IllegalAccessException - Specified by:
findClassin interfaceDefaultRulesReflectionProxy- Throws:
ClassNotFoundExceptionIllegalAccessException
-
findSpecial
public MethodHandle findSpecial(MethodHandles.Lookup lookup, Class<?> refc, String name, MethodType type, Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException - Specified by:
findSpecialin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchMethodExceptionIllegalAccessException
-
findGetter
public MethodHandle findGetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException - Specified by:
findGetterin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionIllegalAccessException
-
findSetter
public MethodHandle findSetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException - Specified by:
findSetterin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionIllegalAccessException
-
findStaticGetter
public MethodHandle findStaticGetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException - Specified by:
findStaticGetterin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionIllegalAccessException
-
findStaticSetter
public MethodHandle findStaticSetter(MethodHandles.Lookup lookup, Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException - Specified by:
findStaticSetterin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionIllegalAccessException
-
bind
public MethodHandle bind(MethodHandles.Lookup lookup, Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException - Specified by:
bindin interfaceDefaultRulesReflectionProxy- Throws:
NoSuchMethodExceptionIllegalAccessException
-
findVarHandle
public VarHandle findVarHandle(MethodHandles.Lookup lookup, Class<?> recv, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException - Specified by:
findVarHandlein interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionIllegalAccessException
-
findStaticVarHandle
public VarHandle findStaticVarHandle(MethodHandles.Lookup lookup, Class<?> decl, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException - Specified by:
findStaticVarHandlein interfaceDefaultRulesReflectionProxy- Throws:
NoSuchFieldExceptionIllegalAccessException
-
metafactory
public CallSite metafactory(MethodHandles.Lookup caller, String interfaceMethodName, MethodType factoryType, MethodType interfaceMethodType, MethodHandle implementation, MethodType dynamicMethodType) throws LambdaConversionException - Specified by:
metafactoryin interfaceDefaultRulesReflectionProxy- Throws:
LambdaConversionException
-
altMetafactory
public CallSite altMetafactory(MethodHandles.Lookup caller, String interfaceMethodName, MethodType factoryType, Object... args) throws LambdaConversionException - Specified by:
altMetafactoryin interfaceDefaultRulesReflectionProxy- Throws:
LambdaConversionException
-
getStaticFinal
public Object getStaticFinal(MethodHandles.Lookup lookup, String name, Class<?> type, Class<?> declaringClass) - Specified by:
getStaticFinalin interfaceDefaultRulesReflectionProxy
-
getStaticFinal
- Specified by:
getStaticFinalin interfaceDefaultRulesReflectionProxy
-
fieldVarHandle
public VarHandle fieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) - Specified by:
fieldVarHandlein interfaceDefaultRulesReflectionProxy
-
staticFieldVarHandle
public VarHandle staticFieldVarHandle(MethodHandles.Lookup lookup, String name, Class<VarHandle> type, Class<?> declaringClass, Class<?> fieldType) - Specified by:
staticFieldVarHandlein interfaceDefaultRulesReflectionProxy
-
fromMethodDescriptorString
public MethodType fromMethodDescriptorString(String descriptor, ClassLoader loader) throws IllegalArgumentException, TypeNotPresentException - Specified by:
fromMethodDescriptorStringin interfaceDefaultRulesReflectionProxy- Throws:
IllegalArgumentExceptionTypeNotPresentException
-