Class JexlInfo

java.lang.Object
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.
  • Constructor Details

    • 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(String source, int l, int c)
      Create info.
      Parameters:
      source - source name
      l - line number
      c - column number
  • Method Details

    • 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 line
      c - The column
      Returns:
      A new info instance
    • detach

      public JexlInfo detach()
      Gets this instance or a copy without any decorations
      Returns:
      this instance or a copy without any decorations
    • getColumn

      public final int getColumn()
      Gets the column number.
      Returns:
      The column.
    • 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 String getName()
      Gets the file/script/url name.
      Returns:
      template name
    • toString

      public String toString()
      Formats this info in the form 'name@line:column'.
      Overrides:
      toString in class Object
      Returns:
      The formatted info