public interface Antlr_To_FileName extends IsTransformer<Object,String>
A transformer that takes an ANTLR runtime object and returns aits souce file name (of the first token).
| Modifier and Type | Method and Description |
|---|---|
static Antlr_To_FileName |
create()
Creates a transformer that takes an ANTLR object and returns the file name where the first token was found.
|
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_FileName create()
Creates a transformer that takes an ANTLR object and returns the file name where the first token was found.
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 filename for ANTLR classes (RecognitionException, Token, ParserRuleContext, TerminalNode).
Copyright © 2016–2017. All rights reserved.