Package org.apache.commons.jexl3
Class JexlInfo
- java.lang.Object
-
- org.apache.commons.jexl3.JexlInfo
-
- Direct Known Subclasses:
JexlNode.Info
public class JexlInfo extends java.lang.ObjectHelper class to carry information such as a url/file name, line and column for debugging information reporting.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceJexlInfo.DetailDescribes errors more precisely.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JexlInfoat(int l, int c)Creates info reusing the name.JexlInfodetach()Gets this instance or a copy without any decorationsstatic JexlInfofrom(JexlScript script)Gets the info from a script.intgetColumn()Gets the column number.JexlInfo.DetailgetDetail()Gets error detailintgetLine()Gets the line number.java.lang.StringgetName()Gets the file/script/url name.java.lang.StringtoString()Formats this info in the form 'name@line:column'.
-
-
-
Constructor Detail
-
JexlInfo
public JexlInfo()
Create an information structure for dynamic set/get/invoke/new.This gathers the class, method and line number of the first calling method outside of o.a.c.jexl3.
-
JexlInfo
protected JexlInfo(JexlInfo copy)
The copy constructor.- Parameters:
copy- the instance to copy
-
JexlInfo
public JexlInfo(java.lang.String source, int l, int c)Create info.- Parameters:
source- source namel- line numberc- column number
-
-
Method Detail
-
from
public static JexlInfo from(JexlScript script)
Gets the info from a script.- Parameters:
script- the script- Returns:
- the info
-
at
public JexlInfo at(int l, int c)
Creates info reusing the name.- Parameters:
l- the linec- the column- Returns:
- a new info instance
-
detach
public JexlInfo detach()
Gets this instance or a copy without any decorations- Returns:
thisinstance or a copy without any decorations
-
getColumn
public final int getColumn()
Gets the column number.- Returns:
- the column.
-
getDetail
public JexlInfo.Detail getDetail()
Gets error detail- Returns:
- the detailed information in case of an error
-
getLine
public final int getLine()
Gets the line number.- Returns:
- line number.
-
getName
public final java.lang.String getName()
Gets the file/script/url name.- Returns:
- template name
-
toString
public java.lang.String toString()
Formats this info in the form 'name@line:column'.- Overrides:
toStringin classjava.lang.Object- Returns:
- the formatted info
-
-