Package org.apache.jasper.compiler
Class SmapStratum
- java.lang.Object
- 
- org.apache.jasper.compiler.SmapStratum
 
- 
 public class SmapStratum extends java.lang.ObjectRepresents the line and file mappings associated with a JSR-045 "stratum".- Author:
- Jayson Falkner, Shawn Bayern
 
- 
- 
Constructor SummaryConstructors Constructor Description SmapStratum()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFile(java.lang.String filename)Adds record of a new file, by filename.voidaddFile(java.lang.String filename, java.lang.String filePath)Adds record of a new file, by filename and path.voidaddLineData(int inputStartLine, java.lang.String inputFileName, int inputLineCount, int outputStartLine, int outputLineIncrement)Adds complete information about a simple line mapping.voidaddLineInfo(org.apache.jasper.compiler.SmapStratum.LineInfo li)java.lang.StringgetClassFileName()SmapInputgetInputLineNumber(int outputLineNumber)java.lang.StringgetSmapString()voidoptimizeLineSection()Combines consecutive LineInfos wherever possiblevoidsetClassFileName(java.lang.String classFileName)voidsetOutputFileName(java.lang.String outputFileName)java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
addFilepublic void addFile(java.lang.String filename) Adds record of a new file, by filename.- Parameters:
- filename- the filename to add, unqualified by path.
 
 - 
addFilepublic void addFile(java.lang.String filename, java.lang.String filePath)Adds record of a new file, by filename and path. The path may be relative to a source compilation path.- Parameters:
- filename- the filename to add, unqualified by path
- filePath- the path for the filename, potentially relative to a source compilation path
 
 - 
optimizeLineSectionpublic void optimizeLineSection() Combines consecutive LineInfos wherever possible
 - 
addLineDatapublic void addLineData(int inputStartLine, java.lang.String inputFileName, int inputLineCount, int outputStartLine, int outputLineIncrement)Adds complete information about a simple line mapping. Specify all the fields in this method; the back-end machinery takes care of printing only those that are necessary in the final SMAP. (My view is that fields are optional primarily for spatial efficiency, not for programmer convenience. Could always add utility methods later.)- Parameters:
- inputStartLine- starting line in the source file (SMAP- InputStartLine)
- inputFileName- the filepath (or name) from which the input comes (yields SMAP- LineFileID) Use unqualified names carefully, and only when they uniquely identify a file.
- inputLineCount- the number of lines in the input to map (SMAP- LineFileCount)
- outputStartLine- starting line in the output file (SMAP- OutputStartLine)
- outputLineIncrement- number of output lines to map to each input line (SMAP- OutputLineIncrement). Given the fact that the name starts with "output", I continuously have the subconscious urge to call this field- OutputLineExcrement.
 
 - 
addLineInfopublic void addLineInfo(org.apache.jasper.compiler.SmapStratum.LineInfo li) 
 - 
setOutputFileNamepublic void setOutputFileName(java.lang.String outputFileName) 
 - 
setClassFileNamepublic void setClassFileName(java.lang.String classFileName) 
 - 
getClassFileNamepublic java.lang.String getClassFileName() 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
getSmapStringpublic java.lang.String getSmapString() 
 - 
getInputLineNumberpublic SmapInput getInputLineNumber(int outputLineNumber) 
 
- 
 
-