Interface ISymbolSupplier<T extends ISymbol>

Type Parameters:
T - the symbol type
All Superinterfaces:
Supplier<Optional<T>>

public interface ISymbolSupplier<T extends ISymbol> extends Supplier<Optional<T>>
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 Details

    • memoize

      static <T extends ISymbol> ISymbolSupplier<T> memoize(ISymbolSupplier<T> supplier)
      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)