Package org.mozilla.javascript
Class SymbolKey
java.lang.Object
org.mozilla.javascript.SymbolKey
- All Implemented Interfaces:
Serializable,Symbol
A SymbolKey is one of the implementations of Symbol. It is really there so that we can easily use
pre-defined symbols as keys in native code. A SymbolKey has the special property that two
NativeSymbol objects with the same key are equal.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKeystatic final SymbolKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the symbol's description - will returnUndefined.instanceif we have an anonymous symbol (i.e. something created withSymbol()).getName()Returns the symbol's name.inthashCode()toString()
-
Field Details
-
ITERATOR
-
TO_STRING_TAG
-
SPECIES
-
HAS_INSTANCE
-
IS_CONCAT_SPREADABLE
-
IS_REGEXP
-
TO_PRIMITIVE
-
MATCH
-
MATCH_ALL
-
REPLACE
-
SEARCH
-
SPLIT
-
UNSCOPABLES
-
-
Constructor Details
-
SymbolKey
-
-
Method Details
-
getName
Returns the symbol's name. Returns empty string for anonymous symbol (i.e. something created withSymbol()). -
getDescription
Returns the symbol's description - will returnUndefined.instanceif we have an anonymous symbol (i.e. something created withSymbol()). -
hashCode
public int hashCode() -
equals
-
toString
-