Top Description Inners Fields Constructors Methods
com.amazon.ion.impl

pack-priv Class LocalSymbolTableAsStruct

extends LocalSymbolTable
implements SymbolTableAsStruct
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl.SymbolTableAsStruct
Annotations
@Deprecated
Imports
com.amazon.ion.IonCatalog, .IonReader, .IonStruct, .SymbolTable, .ValueFactory, java.util.ArrayList, .List

Deprecated

Should not be used in new code without data demonstrating its benefits. Instead, use LocalSymbolTable.

A LocalSymbolTable that memoizes its IonStruct representation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final SymbolTableStructCache
Inherited from com.amazon.ion.impl.LocalSymbolTable:
DEFAULT_LST_FACTORYmyFirstLocalSidmySymbolNamesmySymbolsCount

Constructor Summary

AccessConstructor and Description
private
LocalSymbolTableAsStruct(LocalSymbolTableImports
never null
imports
,
List<String>
may be null or empty
symbolsList
,
IonStruct image)

Method Summary

Modifier and TypeMethod and Description
public IonStruct
getIonRepresentation(ValueFactory
the ValueFactory from which to construct the IonStruct.
factory
)

Implements com.amazon.ion.impl.SymbolTableAsStruct.getIonRepresentation.

Provides an IonStruct representation of the SymbolTable.

pack-priv int
putSymbol(String symbolName)

Overrides com.amazon.ion.impl.LocalSymbolTable.putSymbol.

NOT SYNCHRONIZED!

Inherited from com.amazon.ion.impl.LocalSymbolTable:
findfindKnownSymbolfindSymbolgetImportedMaxIdgetImportedTablesgetImportedTablesNoCopygetIonVersionIdgetMaxIdgetNamegetSystemSymbolTablegetVersioninternisLocalTableisReadOnlyisSharedTableisSubstituteisSystemTableiterateDeclaredSymbolNamesmakeCopymakeCopymakeReadOnlyreadLocalSymbolTablesymtabExtendstoStringunknownSymbolNamewriteTo

Field Detail

structCacheback to summary
private final SymbolTableStructCache structCache

Constructor Detail

LocalSymbolTableAsStructback to summary
private LocalSymbolTableAsStruct(LocalSymbolTableImports imports, List<String> symbolsList, IonStruct image)
Parameters
imports:LocalSymbolTableImports

never null

symbolsList:List<String>

may be null or empty

Method Detail

getIonRepresentationback to summary
public IonStruct getIonRepresentation(ValueFactory factory)

Implements com.amazon.ion.impl.SymbolTableAsStruct.getIonRepresentation.

Doc from com.amazon.ion.impl.SymbolTableAsStruct.getIonRepresentation.

Provides an IonStruct representation of the SymbolTable.

Parameters
factory:ValueFactory

the ValueFactory from which to construct the IonStruct.

Returns:IonStruct

an IonStruct representing the SymbolTable.

Annotations
@Override
putSymbolback to summary
pack-priv int putSymbol(String symbolName)

Overrides com.amazon.ion.impl.LocalSymbolTable.putSymbol.

Doc from com.amazon.ion.impl.LocalSymbolTable.putSymbol.

NOT SYNCHRONIZED! Call within constructor or from synch'd method.

Annotations
@Override
com.amazon.ion.impl back to summary

pack-priv Class LocalSymbolTableAsStruct.Factory

extends Object
implements _Private_LocalSymbolTableFactory
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl._Private_LocalSymbolTableFactory

Field Summary

Modifier and TypeField and Description
private final ValueFactory

Constructor Summary

AccessConstructor and Description
public
Factory(ValueFactory
the factory to use when building a DOM image, not null
imageFactory
)

Method Summary

Modifier and TypeMethod and Description
public SymbolTable
newLocalSymtab(IonCatalog
the catalog containing shared symtabs referenced by import declarations within the local symtab
catalog
,
IonReader
the reader positioned on the local symbol table represented as a struct
reader
,
boolean
denotes whether the reader is already positioned on the struct; false if it is positioned before the struct
alreadyInStruct
)

Implements com.amazon.ion.impl._Private_LocalSymbolTableFactory.newLocalSymtab.

Constructs a new local symbol table represented by the current value of the passed in IonReader.

public SymbolTable
newLocalSymtab(SymbolTable
the default system symtab, which will be used if the first import in imports isn't a system symtab, never null
defaultSystemSymtab
,
SymbolTable...
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
imports
)

Implements com.amazon.ion.impl._Private_LocalSymbolTableFactory.newLocalSymtab.

Constructs a new local symtab with given imports and local symbols.

public SymbolTable
newLocalSymtab(IonCatalog
may be null
catalog
,
IonStruct
the struct represented the local symtab
ionRep
)

Constructs a new local symbol table represented by the passed in IonStruct.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

imageFactoryback to summary
private final ValueFactory imageFactory

Constructor Detail

Factoryback to summary
public Factory(ValueFactory imageFactory)
Parameters
imageFactory:ValueFactory

the factory to use when building a DOM image, not null

Method Detail

newLocalSymtabback to summary
public SymbolTable newLocalSymtab(IonCatalog catalog, IonReader reader, boolean alreadyInStruct)

Implements com.amazon.ion.impl._Private_LocalSymbolTableFactory.newLocalSymtab.

Doc from com.amazon.ion.impl._Private_LocalSymbolTableFactory.newLocalSymtab.

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:IonCatalog

the catalog containing shared symtabs referenced by import declarations within the local symtab

reader:IonReader

the reader positioned on the local symbol table represented as a struct

alreadyInStruct:boolean

denotes whether the reader is already positioned on the struct; false if it is positioned before the struct

newLocalSymtabback to summary
public SymbolTable newLocalSymtab(SymbolTable defaultSystemSymtab, SymbolTable... imports)

Implements com.amazon.ion.impl._Private_LocalSymbolTableFactory.newLocalSymtab.

Doc from com.amazon.ion.impl._Private_LocalSymbolTableFactory.newLocalSymtab.

Constructs a new local symtab with given imports and local symbols.

Parameters
defaultSystemSymtab:SymbolTable

the default system symtab, which will be used if the first import in imports isn't a system symtab, never null

imports:SymbolTable[]

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

newLocalSymtabback to summary
public SymbolTable newLocalSymtab(IonCatalog catalog, IonStruct ionRep)

Constructs a new local symbol table represented by the passed in IonStruct.

Parameters
catalog:IonCatalog

may be null

ionRep:IonStruct

the struct represented the local symtab