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

pack-priv final Class TopLevelContext

extends Object
implements IonContext
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl.lite.IonContext
Imports
com.amazon.ion.SymbolTable

Context for child values of an IonDatagramLite. The datagram's child values that share the same local symbol table will share the same TopLevelContext.

Field Summary

Modifier and TypeField and Description
private final IonDatagramLite
_datagram

References the containing datagram

private final SymbolTable
_symbols

This will be a local symbol table, or null.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public IonDatagramLite
getContextContainer()

Implements com.amazon.ion.impl.lite.IonContext.getContextContainer.

Return the container of values associated with this context.

public SymbolTable
getContextSymbolTable()

Implements com.amazon.ion.impl.lite.IonContext.getContextSymbolTable.

Returns the symbol table that is directly assigned to this context.

public IonSystemLite
getSystem()

Implements com.amazon.ion.impl.lite.IonContext.getSystem.

Get the IonSystem concrete object that created the IonValue that is associated with this context.

pack-priv static TopLevelContext
wrap(SymbolTable symbols, IonDatagramLite datagram)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_datagramback to summary
private final IonDatagramLite _datagram

References the containing datagram

_symbolsback to summary
private final SymbolTable _symbols

This will be a local symbol table, or null. It is not valid for this to be a shared symbol table since shared symbol tables are only shared. It will not be a system symbol table as the system object will be able to resolve its symbol table to the system symbol table and following the parent/owning_context chain will lead to a system object.

TODO amazon-ion/ion-java/issues/19 we cannot assume that the IonSystem knows the proper IVM in this context

Constructor Detail

TopLevelContextback to summary
private TopLevelContext(SymbolTable symbols, IonDatagramLite datagram)

Method Detail

getContextContainerback to summary
public IonDatagramLite getContextContainer()

Implements com.amazon.ion.impl.lite.IonContext.getContextContainer.

Doc from com.amazon.ion.impl.lite.IonContext.getContextContainer.

Return the container of values associated with this context. If this context is an IonContainerLite it returns itself.

Returns:IonDatagramLite

the container of the value; null for stand-alone top level values.

getContextSymbolTableback to summary
public SymbolTable getContextSymbolTable()

Implements com.amazon.ion.impl.lite.IonContext.getContextSymbolTable.

Doc from com.amazon.ion.impl.lite.IonContext.getContextSymbolTable.

Returns the symbol table that is directly assigned to this context. For TopLevelContext it is the symbol table member. For IonContainerLite and IonSystemLite it is null.

Returns:SymbolTable

the directly assigned symbol table, with no recursive lookup.

getSystemback to summary
public IonSystemLite getSystem()

Implements com.amazon.ion.impl.lite.IonContext.getSystem.

Doc from com.amazon.ion.impl.lite.IonContext.getSystem.

Get the IonSystem concrete object that created the IonValue that is associated with this context. Generally this delegates to the parent.

Returns:IonSystemLite

not null

wrapback to summary
pack-priv static TopLevelContext wrap(SymbolTable symbols, IonDatagramLite datagram)