Interface LibraryLookup.Symbol

All Superinterfaces:
Addressable
Enclosing interface:
LibraryLookup

public static interface LibraryLookup.Symbol extends Addressable
A symbol retrieved during a library lookup. A lookup symbol has a name and can be projected into a memory address (see name() and address(), respectively).
API Note:
In the future, if the Java language permits, LibraryLookup.Symbol may become a sealed interface, which would prohibit subclassing except by explicitly permitted types.
Implementation Requirements:
Implementations of this interface are immutable, thread-safe and value-based.
  • Method Summary

    Modifier and Type
    Method
    Description
    The memory address of this lookup symbol.
    The name of this lookup symbol.
  • Method Details

    • name

      String name()
      The name of this lookup symbol.
      Returns:
      the name of this lookup symbol.
    • address

      MemoryAddress address()
      The memory address of this lookup symbol. If the memory associated with this symbol needs to be dereferenced, clients can obtain a segment from this symbol's address using the MemoryAddress.asSegmentRestricted(long, Runnable, Object), and making sure that the created segment maintains a strong reference to this symbol, to prevent library unloading.
      Specified by:
      address in interface Addressable
      Returns:
      the memory address of this lookup symbol.