Interface SymRegistry

All Known Implementing Classes:
SymRegistryImpl

public interface SymRegistry
The bidirectional registry of syms and sym-handles.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Registers or gets the handle of the sym.
    boolean
    isValidHandle(int handle)
    Returns true if the handle is registered.
    symFor(int handle)
    Returns the corresponding sym for the handle.
  • Method Details

    • handleFor

      int handleFor(String sym)
      Registers or gets the handle of the sym.
      Parameters:
      sym - the sym.
      Returns:
      the handle.
      Throws:
      IllegalStateException - if the sym is not registered yet, and the registry does not have capacity for the new sym.
    • symFor

      String symFor(int handle)
      Returns the corresponding sym for the handle.
      Parameters:
      handle - the handle.
      Returns:
      the corresponding sym for the handle.
      Throws:
      IllegalArgumentException - if the specified handle is not registered.
    • isValidHandle

      boolean isValidHandle(int handle)
      Returns true if the handle is registered.
      Parameters:
      handle - the handle.
      Returns:
      true if the handle is registered.