Package org.jruby
Class RubySymbol.SymbolTable
java.lang.Object
org.jruby.RubySymbol.SymbolTable
- Enclosing class:
RubySymbol
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.all_symbols
(ThreadContext context) void
clear()
createSymbol
(String name, boolean hard) Create a new symbol without looking for an existing one.fastGetSymbol
(String internedName) fastGetSymbol
(String internedName, boolean hard) getCalleeSymbolFromCompound
(String compoundName) Get the callee name symbol from a compound name.getMethodSymbolFromCompound
(String compoundName) Get the method name symbol from a compound name.getSymbol
(ByteList bytes, RubySymbol.ObjBooleanConsumer<RubySymbol> handler, boolean hard) Get or retrieve an existing symbol from the table, invoking the given handler before return.lookup
(long id) Deprecated.int
size()
void
store
(RubySymbol symbol) Deprecated.
-
Constructor Details
-
SymbolTable
-
-
Method Details
-
getSymbol
-
getSymbol
-
createSymbol
Create a new symbol without looking for an existing one. Primarily used for core symbols used repeatedly from Java. Use only when you know there is no existing symbol.- Parameters:
name
- name of the symbolhard
- whether to mark it as a hard reference- Returns:
- a new symbol after inserting it into the symbol table
-
getSymbol
-
getSymbol
-
getSymbol
public RubySymbol getSymbol(ByteList bytes, RubySymbol.ObjBooleanConsumer<RubySymbol> handler, boolean hard) Get or retrieve an existing symbol from the table, invoking the given handler before return. In the case of a new symbol, the handler will be invoked before the symbol is registered, so it can be manipulated without leaking changes.- Parameters:
bytes
- the symbol byteshandler
- the handler to invokehard
- whether to hold a hard reference to the symbol- Returns:
- the new or existing symbol
-
getMethodSymbolFromCompound
Get the method name symbol from a compound name.- Parameters:
compoundName
- the compound name- Returns:
- the method component of the compound name, as a symbol
- See Also:
-
getCalleeSymbolFromCompound
Get the callee name symbol from a compound name.- Parameters:
compoundName
- the compound name- Returns:
- the callee component of the compound name, as a symbol
- See Also:
-
fastGetSymbol
-
fastGetSymbol
-
getEncodingSymbolE
-
getEncodingSymbol
-
lookup
-
all_symbols
Deprecated. -
all_symbols
-
size
public int size() -
clear
public void clear() -
lookup
Deprecated. -
store
Deprecated.
-