SmapStratum.LineInfo (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.jasper.compiler, class: SmapStratum, class: LineInfo

# Class SmapStratum.LineInfo

java.lang.Object
org.apache.jasper.compiler.SmapStratum.LineInfo

Enclosing class:
  `SmapStratum`

public static class SmapStratum.LineInfo extends Object
Represents a single LineSection in an SMAP, associated with a particular stratum.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LineInfo()`
  Creates a new LineInfo instance with default values.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getMaxOutputLineNumber()`
  Calculates the maximum output line number covered by this mapping.
  `String`
  `getString()`
  Returns the current LineInfo as a String, printing all values only when appropriate (but LineInfoID if and only if it's been specified, as its necessity is sensitive to context).
  `void`
  `setInputLineCount(int inputLineCount)`
  Sets the number of consecutive input lines covered by this mapping.
  `void`
  `setInputStartLine(int inputStartLine)`
  Sets the starting line number in the input source file.
  `void`
  `setLineFileID(int lineFileID)`
  Sets lineFileID.
  `void`
  `setOutputLineIncrement(int outputLineIncrement)`
  Sets the number of output lines generated per input line.
  `void`
  `setOutputStartLine(int outputStartLine)`
  Sets the starting line number in the output generated file.
  `String`
  `toString()`
  Returns the SMAP string representation of this line info.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### LineInfo

    public LineInfo()
    Creates a new LineInfo instance with default values.

- ## Method Details

  - ### setInputStartLine

    public void setInputStartLine(int inputStartLine)
    Sets the starting line number in the input source file.
    Parameters:
      `inputStartLine` - the starting input line number (must be non-negative)

  - ### setOutputStartLine

    public void setOutputStartLine(int outputStartLine)
    Sets the starting line number in the output generated file.
    Parameters:
      `outputStartLine` - the starting output line number (must be non-negative)

  - ### setLineFileID

    public void setLineFileID(int lineFileID)
    Sets lineFileID. Should be called only when different from that of prior LineInfo object (in any given context) or 0 if the current LineInfo has no (logical) predecessor. `LineInfo` will print this file number no matter what.
    Parameters:
      `lineFileID` - The new line file ID

  - ### setInputLineCount

    public void setInputLineCount(int inputLineCount)
    Sets the number of consecutive input lines covered by this mapping.
    Parameters:
      `inputLineCount` - the number of input lines (must be non-negative)

  - ### setOutputLineIncrement

    public void setOutputLineIncrement(int outputLineIncrement)
    Sets the number of output lines generated per input line.
    Parameters:
      `outputLineIncrement` - the output line increment (must be non-negative)

  - ### getMaxOutputLineNumber

    public int getMaxOutputLineNumber()
    Calculates the maximum output line number covered by this mapping.
    Returns:
      the maximum output line number

  - ### getString

    public String getString()
    Returns the current LineInfo as a String, printing all values only when appropriate (but LineInfoID if and only if it's been specified, as its necessity is sensitive to context).
    Returns:
      the SMAP string representation of this line info

  - ### toString

    public String toString()
    Returns the SMAP string representation of this line info.
    Overrides:
      `toString` in class `Object`
    Returns:
      the SMAP string representation