A symbol table maps symbols between their textual form and an integer ID used in the binary encoding. WARNING: This interface should not be implemented or extended by code outside of this library. There are two kinds of symbol tables: shared and local . With that, the
| 46 | * @see <a href="https://amazon-ion.github.io/ion-docs/docs/symbols.html">Ion Symbols page</a> |
| 47 | */ |
| 48 | public interface SymbolTable |
| 49 | { |
| 50 | /** |
| 51 | * Indicates that a symbol's integer ID could not be determined. That's |
| 52 | * generally the case when constructing value instances that are not yet |
| 53 | * contained by a datagram. |
| 54 | */ |
| 55 | public final static int UNKNOWN_SYMBOL_ID = -1; |
| 56 | |
| 57 | |
| 58 | /** |
| 59 | * Gets the unique name of this symbol table. |
| 60 | * |
| 61 | * @return the unique name, or {@code null} if {@link #isLocalTable()}. |
| 62 | */ |
| 63 | public String getName(); |
| 64 | |
| 65 | |
| 66 | /** |
| 67 | * Gets the version of this symbol table. |
| 68 | * |
| 69 | * @return at least one, or zero if {@link #isLocalTable()}. |
| 70 | */ |
| 71 | public int getVersion(); |
| 72 | |
| 73 | |
| 74 | /** |
| 75 | * Determines whether this symbol table is local, and therefore unnamed |
| 76 | * and unversioned. |
| 77 | * <p> |
| 78 | * If this method returns {@code true}, then both {@link #isSharedTable()} |
| 79 | * and {@link #isSystemTable()} will return {@code false}. |
| 80 | */ |
| 81 | public boolean isLocalTable(); |
| 82 | |
| 83 | /** |
| 84 | * Determines whether this symbol table is shared, and therefore named, |
| 85 | * versioned, and {@linkplain #isReadOnly() read-only}. |
| 86 | * <p> |
| 87 | * If this method returns {@code true}, then {@link #isLocalTable()} |
| 88 | * will return {@code false}. |
| 89 | */ |
| 90 | public boolean isSharedTable(); |
| 91 | |
| 92 | /** |
| 93 | * Determines whether this instance is substituting for an imported |
| 94 | * shared table for which no exact match was found in the catalog. |
| 95 | * Such tables are not authoritative and may not even have any symbol text |
| 96 | * at all (as is the case when no version of an imported table is found). |
| 97 | * <p> |
| 98 | * Substitute tables are always shared, non-system tables. |
| 99 | * |
| 100 | */ |
| 101 | public boolean isSubstitute(); |
| 102 | |
| 103 | /** |
| 104 | * Determines whether this symbol table is a system symbol table, and |
| 105 | * therefore shared, named, versioned, and |
no outgoing calls
no test coverage detected
searching dependent graphs…