- All Known Implementing Classes:
SymRegistryImpl
public interface SymRegistry
The bidirectional registry of syms and sym-handles.
-
Method Summary
Modifier and TypeMethodDescriptionint
Registers or gets the handle of the sym.getSym
(int handle) Returns the corresponding sym for the handle.boolean
isValidHandle
(int handle) Returns true if the handle is registered.
-
Method Details
-
getHandle
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.
-
getSym
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.
-