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
ConstructorsModifierConstructorDescriptionprotectedExternalSymbolMapBase(boolean assumeSymbolsRequireExternalSymbolMapArgument) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ISymbolReturns the value for the symbol with the given name.Called via bytecode.Invokes the named external function with the given arguments.private booleanisCapturedSymbol(int iArrayDims, Object value, Class valueClass) voidSets the value of the symbol with the given name.protected booleanprotected voidverifySymbol(String name, ISymbol symbol)
-
Field Details
-
_assumeSymbolsRequireExternalSymbolMapArgument
private boolean _assumeSymbolsRequireExternalSymbolMapArgument
-
-
Constructor Details
-
ExternalSymbolMapBase
protected ExternalSymbolMapBase(boolean assumeSymbolsRequireExternalSymbolMapArgument)
-
-
Method Details
-
getValue
Description copied from interface:IExternalSymbolMapReturns 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:
getValuein interfaceIExternalSymbolMap- Parameters:
name- the name of the symbol- Returns:
- the current value of the symbol
-
getValue
Description copied from interface:IExternalSymbolMapCalled via bytecode.- Specified by:
getValuein interfaceIExternalSymbolMapiArrayDims- 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:IExternalSymbolMapSets 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:
setValuein interfaceIExternalSymbolMap- Parameters:
name- the name of the symbolvalue- the new value to give that symbol
-
invoke
Description copied from interface:IExternalSymbolMapInvokes 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:
invokein interfaceIExternalSymbolMap- Parameters:
name- the name of the function symbolargs- the arguments to the method- Returns:
- the result of the function invocation
-
shouldAddInExternalSymbolMapArgumentForFunctionSymbol
-
verifySymbol
-
getSymbol
-