Package org.apache.jasper.compiler
Class SmapGenerator
- java.lang.Object
- 
- org.apache.jasper.compiler.SmapGenerator
 
- 
 public class SmapGenerator extends java.lang.ObjectRepresents a source map (SMAP), which serves to associate lines of the input JSP file(s) to lines in the generated servlet in the final .class file, according to the JSR-045 spec.- Author:
- Shawn Bayern
 
- 
- 
Constructor SummaryConstructors Constructor Description SmapGenerator()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddSmap(java.lang.String smap, java.lang.String stratumName)Deprecated.Unused.voidaddStratum(SmapStratum stratum, boolean defaultStratum)Deprecated.java.lang.StringgetString()static voidmain(java.lang.String[] args)voidsetDoEmbedded(boolean status)Deprecated.Unused.voidsetOutputFileName(java.lang.String x)Sets the filename (without path information) for the generated source file.voidsetStratum(SmapStratum stratum)Sets the default and only stratum for the smap.java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
setOutputFileNamepublic void setOutputFileName(java.lang.String x) Sets the filename (without path information) for the generated source file. E.g., "foo$jsp.java".- Parameters:
- x- The file name
 
 - 
setStratumpublic void setStratum(SmapStratum stratum) Sets the default and only stratum for the smap.- Parameters:
- stratum- the SmapStratum object to add
 
 - 
addStratum@Deprecated public void addStratum(SmapStratum stratum, boolean defaultStratum) Deprecated.Adds the given SmapStratum object, representing a Stratum with logically associated FileSection and LineSection blocks, to the current SmapGenerator. IfdefaultStartumis true, this stratum is made the default stratum, overriding any previously set default.- Parameters:
- stratum- the SmapStratum object to add
- defaultStratum- if- true, this SmapStratum is considered to represent the default SMAP stratum unless overwritten
 
 - 
addSmap@Deprecated public void addSmap(java.lang.String smap, java.lang.String stratumName)Deprecated.Unused. This will be removed in Tomcat 9.0.xAdds the given string as an embedded SMAP with the given stratum name.- Parameters:
- smap- the SMAP to embed
- stratumName- the name of the stratum output by the compilation that produced the- smapto be embedded
 
 - 
setDoEmbedded@Deprecated public void setDoEmbedded(boolean status) Deprecated.Unused. Will be removed in Tomcat 9.0.xInstructs the SmapGenerator whether to actually print any embedded SMAPs or not. Intended for situations without an SMAP resolver.- Parameters:
- status- If- false, ignore any embedded SMAPs.
 
 - 
getStringpublic java.lang.String getString() 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
mainpublic static void main(java.lang.String[] args) 
 
- 
 
-