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