org.apache.commons.jexl3
Class JexlInfo

java.lang.Object
  extended by org.apache.commons.jexl3.JexlInfo

public class JexlInfo
extends Object

Helper class to carry information such as a url/file name, line and column for debugging information reporting.


Nested Class Summary
static interface JexlInfo.Detail
          Describes errors more precisely.
 
Constructor Summary
protected JexlInfo(JexlInfo copy)
          The copy constructor.
  JexlInfo(String source, int l, int c)
          Create info.
 
Method Summary
 JexlInfo at(int l, int c)
          Creates info reusing the name.
 int getColumn()
          Gets the column number.
 JexlInfo.Detail getDetail()
           
 int getLine()
          Gets the line number.
 String getName()
          Gets the file/script/url name.
 String toString()
          Formats this info in the form 'name@line:column'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JexlInfo

public JexlInfo(String source,
                int l,
                int c)
Create info.

Parameters:
source - source name
l - line number
c - column number

JexlInfo

protected JexlInfo(JexlInfo copy)
The copy constructor.

Parameters:
copy - the instance to copy
Method Detail

getDetail

public JexlInfo.Detail getDetail()
Returns:
the detailed information in case of an error

at

public JexlInfo at(int l,
                   int c)
Creates info reusing the name.

Parameters:
l - the line
c - the column
Returns:
a new info instance

toString

public String toString()
Formats this info in the form 'name@line:column'.

Overrides:
toString in class Object
Returns:
the formatted info

getName

public final String getName()
Gets the file/script/url name.

Returns:
template name

getLine

public final int getLine()
Gets the line number.

Returns:
line number.

getColumn

public final int getColumn()
Gets the column number.

Returns:
the column.


Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.