Class MemberHandle
java.lang.Object
com.cryptomorin.xseries.reflection.jvm.MemberHandle
- All Implemented Interfaces:
ReflectiveHandle<MethodHandle>,Cloneable
- Direct Known Subclasses:
ConstructorMemberHandle,NamedMemberHandle
This class should not be used directly.
Any object that is a member of a Class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract MemberHandleclone()Creates a new handle with the same properties.Returns the class associated with this member.protected <T extends AccessibleObject & Member>
ThandleAccessible(T accessibleObject) Handles private/final declarations.If this member is known to be private or a final field.abstract MethodHandlereflect()The heart of the class.abstract <T extends AccessibleObject & Member>
TIt's preferred to use one of theMethodHandlemethods instead.abstract MemberHandleChanges the signature of this handle according to the given java code (seeReflectionParser) This overrides the current declaration, but names will be kept and any new names specified in the signature will also be added.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cryptomorin.xseries.reflection.ReflectiveHandle
catchError, exists, reflectOrNull, unreflect
-
Field Details
-
makeAccessible
protected boolean makeAccessible -
isFinal
protected boolean isFinal -
clazz
-
-
Constructor Details
-
MemberHandle
-
-
Method Details
-
getClassHandle
Returns the class associated with this member. This is not meant to be used directly. -
makeAccessible
If this member is known to be private or a final field. -
signature
Changes the signature of this handle according to the given java code (seeReflectionParser) This overrides the current declaration, but names will be kept and any new names specified in the signature will also be added. -
reflect
Description copied from interface:ReflectiveHandleThe heart of the class.- Specified by:
reflectin interfaceReflectiveHandle<MethodHandle>- Returns:
- the final JVM object that exists in this runtime.
- Throws:
ReflectiveOperationException- if any errors occur while getting the object, including unknown objects, security issues, etc...- See Also:
-
reflectJvm
public abstract <T extends AccessibleObject & Member> T reflectJvm() throws ReflectiveOperationExceptionIt's preferred to use one of theMethodHandlemethods instead. This method should only be used for special cases when a direct JVM object is needed.- Throws:
ReflectiveOperationException- See Also:
-
handleAccessible
protected <T extends AccessibleObject & Member> T handleAccessible(T accessibleObject) throws ReflectiveOperationException Handles private/final declarations.- Throws:
ReflectiveOperationException
-
clone
Description copied from interface:ReflectiveHandleCreates a new handle with the same properties.- Specified by:
clonein interfaceReflectiveHandle<MethodHandle>- Overrides:
clonein classObject
-