APIdia Launch Partner
Top Description Methods
jdk.internal.access

public Interface JavaLangReflectAccess

Known Direct Implementers
java.lang.reflect.ReflectAccess
Imports
java.lang.reflect.*, jdk.internal.reflect.*

An interface which gives privileged packages Java-level access to internals of java.lang.reflect. Use as a last resort!

Method Summary

Modifier and TypeMethod and Description
public void
checkAllowedToUnreflectFinalSetter(Class<?> caller, Field f)

Check that the caller is allowed to unreflect for mutation a final instance field in a class that is not a record or hidden class.

public <T> Constructor<T>
copyConstructor(Constructor<T> arg)

Makes a "child" copy of a Constructor

public Field
copyField(Field arg)

Makes a "child" copy of a Field

public Method
copyMethod(Method arg)

Makes a "child" copy of a Method

public Class<?>[]
getExecutableSharedExceptionTypes(Executable ex)

Gets the shared array of exception types of an Executable.

public Class<?>[]
getExecutableSharedParameterTypes(Executable ex)

Gets the shared array of parameter types of an Executable.

public byte[]
getExecutableTypeAnnotationBytes(Executable ex)

Gets the byte[] that encodes TypeAnnotations on an Executable.

public <T extends AccessibleObject> T
getRoot(T obj)

Gets the root of the given AccessibleObject object; null if arg is the root

public boolean
isTrustedFinalField(Field f)

Tests if this is a trusted final field

public <T> Constructor<T>
newConstructorWithAccessor(Constructor<T> original, ConstructorAccessor accessor)

Creates a new root constructor from the original one, with a custom accessor.

public <T> T
newInstance(Constructor<T> ctor, Object[] args, Class<?> caller)

Returns a new instance created by the given constructor with access check

Method Detail

checkAllowedToUnreflectFinalSetterback to summary
public void checkAllowedToUnreflectFinalSetter(Class<?> caller, Field f) throws IllegalAccessException

Check that the caller is allowed to unreflect for mutation a final instance field in a class that is not a record or hidden class.

copyConstructorback to summary
public <T> Constructor<T> copyConstructor(Constructor<T> arg)

Makes a "child" copy of a Constructor

copyFieldback to summary
public Field copyField(Field arg)

Makes a "child" copy of a Field

copyMethodback to summary
public Method copyMethod(Method arg)

Makes a "child" copy of a Method

getExecutableSharedExceptionTypesback to summary
public Class<?>[] getExecutableSharedExceptionTypes(Executable ex)

Gets the shared array of exception types of an Executable.

getExecutableSharedParameterTypesback to summary
public Class<?>[] getExecutableSharedParameterTypes(Executable ex)

Gets the shared array of parameter types of an Executable.

getExecutableTypeAnnotationBytesback to summary
public byte[] getExecutableTypeAnnotationBytes(Executable ex)

Gets the byte[] that encodes TypeAnnotations on an Executable.

getRootback to summary
public <T extends AccessibleObject> T getRoot(T obj)

Gets the root of the given AccessibleObject object; null if arg is the root

isTrustedFinalFieldback to summary
public boolean isTrustedFinalField(Field f)

Tests if this is a trusted final field

newConstructorWithAccessorback to summary
public <T> Constructor<T> newConstructorWithAccessor(Constructor<T> original, ConstructorAccessor accessor)

Creates a new root constructor from the original one, with a custom accessor. Used by serialization hooks.

newInstanceback to summary
public <T> T newInstance(Constructor<T> ctor, Object[] args, Class<?> caller) throws IllegalAccessException, InstantiationException, InvocationTargetException

Returns a new instance created by the given constructor with access check