Package gw.lang.parser
Class ExternalSymbolMapBase
java.lang.Object
gw.lang.parser.ExternalSymbolMapBase
- All Implemented Interfaces:
IExternalSymbolMap
- Direct Known Subclasses:
ExternalSymbolMapForMap
,ExternalSymbolMapSymbolTableWrapper
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ExternalSymbolMapBase
(boolean assumeSymbolsRequireExternalSymbolMapArgument) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ISymbol
Returns the value for the symbol with the given name.Called via bytecode.Invokes the named external function with the given arguments.private boolean
isCapturedSymbol
(int iArrayDims, Object value, Class valueClass) void
Sets the value of the symbol with the given name.protected boolean
protected void
verifySymbol
(String name, ISymbol symbol)
-
Field Details
-
_assumeSymbolsRequireExternalSymbolMapArgument
private boolean _assumeSymbolsRequireExternalSymbolMapArgument
-
-
Constructor Details
-
ExternalSymbolMapBase
protected ExternalSymbolMapBase(boolean assumeSymbolsRequireExternalSymbolMapArgument)
-
-
Method Details
-
getValue
Description copied from interface:IExternalSymbolMap
Returns the value for the symbol with the given name. Throws a runtime exception if the name does not correspond to a valid external symbol.- Specified by:
getValue
in interfaceIExternalSymbolMap
- Parameters:
name
- the name of the symbol- Returns:
- the current value of the symbol
-
getValue
Description copied from interface:IExternalSymbolMap
Called via bytecode.- Specified by:
getValue
in interfaceIExternalSymbolMap
iArrayDims
- the expected number of array dimensions of the the symbol's type, useful for debugger expr evaluation for dynamically unwrapping type a single elem array (a captured var)- Returns:
-
isCapturedSymbol
-
setValue
Description copied from interface:IExternalSymbolMap
Sets the value of the symbol with the given name. Throws a runtime exception if the name does not correspond to a valid external symbol.- Specified by:
setValue
in interfaceIExternalSymbolMap
- Parameters:
name
- the name of the symbolvalue
- the new value to give that symbol
-
invoke
Description copied from interface:IExternalSymbolMap
Invokes the named external function with the given arguments. The name argument should correspond to the result of calling getName() on the external function symbol.- Specified by:
invoke
in interfaceIExternalSymbolMap
- Parameters:
name
- the name of the function symbolargs
- the arguments to the method- Returns:
- the result of the function invocation
-
shouldAddInExternalSymbolMapArgumentForFunctionSymbol
-
verifySymbol
-
getSymbol
-