APIdia Launch Partner
Top Fields Constructors Methods
java.lang.invoke

pack-priv final Class InfoFromMemberName

extends Object
implements MethodHandleInfo
Class Inheritance
All Implemented Interfaces
java.lang.invoke.MethodHandleInfo
Imports
java.lang.reflect.*, java.lang.invoke.MethodHandles.Lookup

Field Summary

Modifier and TypeField and Description
private final MemberName
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
InfoFromMemberName(MethodHandles.Lookup lookup, MemberName member, byte referenceKind)

Method Summary

Modifier and TypeMethod and Description
private static MemberName
convertToMemberName(byte refKind, Member mem)

public Class<?>
getDeclaringClass()

Implements java.lang.invoke.MethodHandleInfo.getDeclaringClass.

Returns the class in which the cracked method handle's underlying member was defined.

public MethodType
getMethodType()

Implements java.lang.invoke.MethodHandleInfo.getMethodType.

Returns the nominal type of the cracked symbolic reference, expressed as a method type.

public int
getModifiers()

Implements java.lang.invoke.MethodHandleInfo.getModifiers.

Returns the access modifiers of the underlying member.

public String
getName()

Implements java.lang.invoke.MethodHandleInfo.getName.

Returns the name of the cracked method handle's underlying member.

public int
getReferenceKind()

Implements java.lang.invoke.MethodHandleInfo.getReferenceKind.

Returns the reference kind of the cracked method handle, which in turn determines whether the method handle's underlying member was a constructor, method, or field.

public <T extends Member> T
reflectAs(Class<T> expected, MethodHandles.Lookup lookup)

Implements java.lang.invoke.MethodHandleInfo.reflectAs.

Reflects the underlying member as a method, constructor, or field object.

private Member
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

memberback to summary
private final MemberName member
referenceKindback to summary
private final int referenceKind

Constructor Detail

InfoFromMemberNameback to summary
pack-priv InfoFromMemberName(MethodHandles.Lookup lookup, MemberName member, byte referenceKind)

Method Detail

convertToMemberNameback to summary
private static MemberName convertToMemberName(byte refKind, Member mem) throws IllegalAccessException
getDeclaringClassback to summary
public Class<?> getDeclaringClass()

Implements java.lang.invoke.MethodHandleInfo.getDeclaringClass.

Doc from java.lang.invoke.MethodHandleInfo.getDeclaringClass.

Returns the class in which the cracked method handle's underlying member was defined.

Annotations
@Override
getMethodTypeback to summary
public MethodType getMethodType()

Implements java.lang.invoke.MethodHandleInfo.getMethodType.

Doc from java.lang.invoke.MethodHandleInfo.getMethodType.

Returns the nominal type of the cracked symbolic reference, expressed as a method type. If the reference is to a constructor, the return type will be void. If it is to a non-static method, the method type will not mention the this parameter. If it is to a field and the requested access is to read the field, the method type will have no parameters and return the field type. If it is to a field and the requested access is to write the field, the method type will have one parameter of the field type and return void.

Note that original direct method handle may include a leading this parameter, or (in the case of a constructor) will replace the void return type with the constructed class. The nominal type does not include any this parameter, and (in the case of a constructor) will return void.

Annotations
@Override
getModifiersback to summary
public int getModifiers()

Implements java.lang.invoke.MethodHandleInfo.getModifiers.

Doc from java.lang.invoke.MethodHandleInfo.getModifiers.

Returns the access modifiers of the underlying member.

Annotations
@Override
getNameback to summary
public String getName()

Implements java.lang.invoke.MethodHandleInfo.getName.

Doc from java.lang.invoke.MethodHandleInfo.getName.

Returns the name of the cracked method handle's underlying member. This is <init> if the underlying member was a constructor, else it is a simple method name or field name.

Annotations
@Override
getReferenceKindback to summary
public int getReferenceKind()

Implements java.lang.invoke.MethodHandleInfo.getReferenceKind.

Doc from java.lang.invoke.MethodHandleInfo.getReferenceKind.

Returns the reference kind of the cracked method handle, which in turn determines whether the method handle's underlying member was a constructor, method, or field. See the table above for definitions.

Annotations
@Override
reflectAsback to summary
public <T extends Member> T reflectAs(Class<T> expected, MethodHandles.Lookup lookup)

Implements java.lang.invoke.MethodHandleInfo.reflectAs.

Doc from java.lang.invoke.MethodHandleInfo.reflectAs.

Reflects the underlying member as a method, constructor, or field object. If the underlying member is public, it is reflected as if by getMethod, getConstructor, or getField. Otherwise, it is reflected as if by getDeclaredMethod, getDeclaredConstructor, or getDeclaredField. The underlying member must be accessible to the given lookup object.

Annotations
@Override
reflectUncheckedback to summary
private Member reflectUnchecked() throws ReflectiveOperationException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override