public final class Language extends Object
| Modifier and Type | Method and Description |
|---|---|
static Criteria |
translateFromThriftCriteria(TCriteria tcriteria)
Translate the
tcriteria to its Java analog, with each value
symbol prepared for round-tripping through CCL text. |
static Symbol |
translateFromThriftSymbol(TSymbol tsymbol)
Translate the
TSymbol to its canonical Symbol analog,
acting as the inverse of translateToThriftSymbol(Symbol). |
static TCriteria |
translateToThriftCriteria(Criteria criteria)
Translate the
criteria to its Thrift analog. |
static TSymbol |
translateToThriftSymbol(Symbol symbol)
Translate
symbol to its Thrift analog. |
public static Criteria translateFromThriftCriteria(TCriteria tcriteria)
tcriteria to its Java analog, with each value
symbol prepared for round-tripping through CCL text.
The returned Criteria is suitable for emission via
Criteria.ccl() followed by re-parsing: any value whose original
TSymbol was wrapped in quotes to escape a CCL keyword retains
those quotes so the re-parse interprets it as a literal rather than
misreading the bare word as syntax. Callers that need a raw inverse of
translateToThriftCriteria(Criteria) for direct AST construction
should translate each TSymbol individually with
translateFromThriftSymbol(TSymbol).
tcriteria - Criteriapublic static Symbol translateFromThriftSymbol(TSymbol tsymbol)
TSymbol to its canonical Symbol analog,
acting as the inverse of translateToThriftSymbol(Symbol).
The returned Symbol carries the value as a Java object suitable
for direct AST
construction. Callers that subsequently re-emit the Symbol as CCL
text (for example, via Criteria.ccl()) must use
translateFromThriftCriteria(com.cinchapi.concourse.thrift.TCriteria) instead, which preserves the
original quote-escaping that CCL re-parsing requires.
tsymbol - Symbolpublic static TCriteria translateToThriftCriteria(Criteria criteria)
criteria to its Thrift analog.criteria - public static TSymbol translateToThriftSymbol(Symbol symbol)
symbol to its Thrift analog.symbol -