MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / IonSystemLite

Class IonSystemLite

src/main/java/com/amazon/ion/impl/lite/IonSystemLite.java:51–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51@SuppressWarnings("deprecation")
52final class IonSystemLite
53 extends ValueFactoryLite
54 implements _Private_IonSystem
55{
56
57 private final SymbolTable _system_symbol_table;
58
59 /** Not null. */
60 private final IonCatalog _catalog;
61 private final IonLoader _loader;
62
63 /** Immutable. */
64 private final IonTextWriterBuilder myTextWriterBuilder;
65 /** Immutable. */
66 private final _Private_IonBinaryWriterBuilder myBinaryWriterBuilder;
67 /** Immutable. **/
68 private final IonReaderBuilder myReaderBuilder;
69
70 public IonSystemLite(IonTextWriterBuilder twb,
71 _Private_IonBinaryWriterBuilder bwb,
72 IonReaderBuilder rb)
73 {
74 IonCatalog catalog = twb.getCatalog();
75 assert catalog != null;
76 assert catalog == bwb.getCatalog();
77 assert catalog == rb.getCatalog();
78
79 _catalog = catalog;
80 myReaderBuilder = ((_Private_IonReaderBuilder) rb).withLstFactory(_lstFactory).immutable();
81 _loader = new IonLoaderLite(this, catalog);
82 _system_symbol_table = bwb.getInitialSymbolTable();
83 assert _system_symbol_table.isSystemTable();
84
85 myTextWriterBuilder = twb.immutable();
86
87 set_system(this);
88
89 bwb.setSymtabValueFactory(this);
90 myBinaryWriterBuilder = bwb.immutable();
91 }
92
93 IonReaderBuilder getReaderBuilder() {
94 return myReaderBuilder;
95 }
96
97 //==========================================================================
98 // IonSystem Methods
99 //==========================================================================
100
101 public boolean isStreamCopyOptimized()
102 {
103 return myBinaryWriterBuilder.isStreamCopyOptimized();
104 }
105
106 @SuppressWarnings("unchecked")
107 public <T extends IonValue> T clone(T value) throws IonException
108 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…