JavacErrorDetail (Apache Tomcat 11.0.22 API Documentation)
Description: declaration: package: org.apache.jasper.compiler, class: JavacErrorDetail

# Class JavacErrorDetail

java.lang.Object
org.apache.jasper.compiler.JavacErrorDetail

public class JavacErrorDetail extends Object
Class providing details about a javac compilation error.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavacErrorDetail(String javaFileName, int javaLineNum, StringBuilder errMsg)`
  Constructor.
  `JavacErrorDetail(String javaFileName, int javaLineNum, String jspFileName, int jspBeginLineNum, StringBuilder errMsg, JspCompilationContext ctxt)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getErrorMessage()`
  Gets the compilation error message.
  `String`
  `getJavaFileName()`
  Gets the name of the Java source file in which the compilation error occurred.
  `int`
  `getJavaLineNumber()`
  Gets the compilation error line number.
  `int`
  `getJspBeginLineNumber()`
  Gets the start line number (in the JSP file) of the JSP element responsible for the compilation error.
  `String`
  `getJspExtract()`
  Gets the extract of the JSP that corresponds to this message.
  `String`
  `getJspFileName()`
  Gets the name of the JSP file from which the Java source file was generated.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JavacErrorDetail

    public JavacErrorDetail(String javaFileName, int javaLineNum, StringBuilder errMsg)
    Constructor.
    Parameters:
      `javaFileName` - The name of the Java file in which the compilation error occurred
      `javaLineNum` - The compilation error line number
      `errMsg` - The compilation error message

  - ### JavacErrorDetail

    public JavacErrorDetail(String javaFileName, int javaLineNum, String jspFileName, int jspBeginLineNum, StringBuilder errMsg, JspCompilationContext ctxt)
    Constructor.
    Parameters:
      `javaFileName` - The name of the Java file in which the compilation error occurred
      `javaLineNum` - The compilation error line number
      `jspFileName` - The name of the JSP file from which the Java source file was generated
      `jspBeginLineNum` - The start line number of the JSP element responsible for the compilation error
      `errMsg` - The compilation error message
      `ctxt` - The compilation context

- ## Method Details

  - ### getJavaFileName

    public String getJavaFileName()
    Gets the name of the Java source file in which the compilation error occurred.
    Returns:
      Java source file name

  - ### getJavaLineNumber

    public int getJavaLineNumber()
    Gets the compilation error line number.
    Returns:
      Compilation error line number

  - ### getJspFileName

    public String getJspFileName()
    Gets the name of the JSP file from which the Java source file was generated.
    Returns:
      JSP file from which the Java source file was generated.

  - ### getJspBeginLineNumber

    public int getJspBeginLineNumber()
    Gets the start line number (in the JSP file) of the JSP element responsible for the compilation error.
    Returns:
      Start line number of the JSP element responsible for the compilation error

  - ### getErrorMessage

    public String getErrorMessage()
    Gets the compilation error message.
    Returns:
      Compilation error message

  - ### getJspExtract

    public String getJspExtract()
    Gets the extract of the JSP that corresponds to this message.
    Returns:
      Extract of JSP where error occurred