APIdia Launch Partner
Top Description Fields Methods
java.lang.classfile.constantpool

public sealed Interface MemberRefEntry

extends PoolEntry
permits FieldRefEntry, InterfaceMethodRefEntry, MethodRefEntry, AbstractMemberRefEntry
Known Direct Subinterfaces
java.lang.classfile.constantpool.MethodRefEntry, java.lang.classfile.constantpool.FieldRefEntry, java.lang.classfile.constantpool.InterfaceMethodRefEntry
Known Direct Implementers
jdk.internal.classfile.impl.AbstractPoolEntry.AbstractMemberRefEntry
Imports
java.lang.classfile.Opcode, jdk.internal.classfile.impl.AbstractPoolEntry

Superinterface modeling symbolic references to a member of a class or interface in the constant pool of a class file, which include references to fields, class methods, and interface methods.

Different types of symbolic references to a member of a class or interface bear structural similarities and share parts of the resolution processes, and they can sometimes appear in the same locations. For example, both MethodRefEntry and InterfaceMethodRefEntry can appear in an invokestatic instruction.

A member reference entry is composite:

MemberRefEntry( ClassEntry owner, NameAndTypeEntry nameAndType )
MemberRefEntry(
    ClassEntry owner,
    NameAndTypeEntry nameAndType
)
Since
24
Java Virtual Machine Specification
4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures

Field Summary

Inherited from java.lang.classfile.constantpool.PoolEntry:
TAG_CLASSTAG_DOUBLETAG_DYNAMICTAG_FIELDREFTAG_FLOATTAG_INTEGERTAG_INTERFACE_METHODREFTAG_INVOKE_DYNAMICTAG_LONGTAG_METHOD_HANDLETAG_METHOD_TYPETAG_METHODREFTAG_MODULETAG_NAME_AND_TYPETAG_PACKAGETAG_STRINGTAG_UTF8

Method Summary

Modifier and TypeMethod and Description
public default Utf8Entry

Returns:

the name of the member
name
()

Returns the name of the member.

public NameAndTypeEntry

Returns:

the name and descriptor string of the member
nameAndType
()

Returns the name and descriptor string of the member.

public ClassEntry

Returns:

the class or interface which this member belongs to
owner
()

Returns the class or interface which this member belongs to.

public default Utf8Entry

Returns:

the descriptor string of the member
type
()

Returns the descriptor string of the member.

Inherited from java.lang.classfile.constantpool.PoolEntry:
constantPoolindextagwidth

Method Detail

nameback to summary
public default Utf8Entry name()

Returns the name of the member.

Returns:Utf8Entry

the name of the member

nameAndTypeback to summary
public NameAndTypeEntry nameAndType()

Returns the name and descriptor string of the member.

Returns:NameAndTypeEntry

the name and descriptor string of the member

ownerback to summary
public ClassEntry owner()

Returns the class or interface which this member belongs to.

Returns:ClassEntry

the class or interface which this member belongs to

typeback to summary
public default Utf8Entry type()

Returns the descriptor string of the member. This is a field descriptor string if this entry is a FieldRefEntry, or a method descriptor string if this entry is a MethodRefEntry or InterfaceMethodRefEntry.

API Note

Each subinterface defines a typeSymbol() accessor for the symbolic descriptor for the member type.

Returns:Utf8Entry

the descriptor string of the member