Interface _Private_LocalSymbolTableFactory


  • public interface _Private_LocalSymbolTableFactory
    NOT FOR APPLICATION USE Implementations of this interface may be provided to IonReaders in order to force them to construct LocalSymbolTables in a different way. In practice, this is used to construct a different LocalSymbolTable implementation for use with the DOM than is used purely by readers and writers. If LocalSymbolTableAsStruct is ever deleted, this can go away too.
    • Method Detail

      • newLocalSymtab

        SymbolTable newLocalSymtab​(IonCatalog catalog,
                                   IonReader reader,
                                   boolean alreadyInStruct)
        Constructs a new local symbol table represented by the current value of the passed in IonReader.

        NOTE: It is assumed that the passed in reader is positioned properly on/before a value that represents a local symtab semantically. That is, no exception-checks are made on the IonType and annotation, callers are responsible for checking this!

        Parameters:
        catalog - the catalog containing shared symtabs referenced by import declarations within the local symtab
        reader - the reader positioned on the local symbol table represented as a struct
        alreadyInStruct - denotes whether the reader is already positioned on the struct; false if it is positioned before the struct
      • newLocalSymtab

        SymbolTable newLocalSymtab​(SymbolTable defaultSystemSymtab,
                                   SymbolTable... imports)
        Constructs a new local symtab with given imports and local symbols.
        Parameters:
        defaultSystemSymtab - the default system symtab, which will be used if the first import in imports isn't a system symtab, never null
        imports - the set of shared symbol tables to import; the first (and only the first) may be a system table, in which case the defaultSystemSymtab is ignored
        Throws:
        java.lang.IllegalArgumentException - if any import is a local table, or if any but the first is a system table
        java.lang.NullPointerException - if any import is null