Package de.monticore.symboltable
Interface ISymbolSupplier<T extends ISymbol>
- Type Parameters:
T- the symbol type
Supplies a symbol on demand.
This class acts as a replacement to the SymbolSurrogates
(which did not support composition, a TypeSurrogate
did not actually surrogate a CDTypeSurrogate, with CDTypeSym extends TypeSym.)
Errors during resolving are logged and an empty optional is returned.
Use
memoize(ISymbolSupplier) to only resolve for a symbol once.-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T extends ISymbol>
ISymbolSupplier<T> memoize(ISymbolSupplier<T> supplier) Memoize a supplier: Only attempt to resolve once
-
Method Details
-
memoize
Memoize a supplier: Only attempt to resolve once- Type Parameters:
T- the symbol type- Parameters:
supplier- the supplier- Returns:
- a memoized supplier (that only resolved once)
-