public interface Antlr_To_Text extends IsTransformer<Object,String>
Transforms ANTLR runtime objects to text.
| Modifier and Type | Method and Description |
|---|---|
static Antlr_To_Text |
create()
Creates a transformer that takes an ANTLR object and returns a textual representation of it.
|
default String |
transform(Object obj)
Transforms from one representation to another.
|
apply, transformdefault String transform(Object obj)
TransformerTransforms from one representation to another.
transform in interface Transformer<Object,String>obj - input representationstatic Antlr_To_Text create()
Creates a transformer that takes an ANTLR object and returns a textual representation of it.
The returned transformer will throw runtime exceptions (null pointer, illegal argument) if the given object was not an ANTLR runtime object.
The transformer returns null or text for ANTLR classes ( RecognitionException`, Token, ParserRuleContext, TerminalNode).
Copyright © 2016–2017. All rights reserved.