Package org.apache.jasper.compiler
Class PageInfo
- java.lang.Object
-
- org.apache.jasper.compiler.PageInfo
-
public class PageInfo extends java.lang.ObjectA repository for various info about the translation unit under compilation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependant(java.lang.String d, java.lang.Long lastModified)Adds a dependent file to this page.voidaddImport(java.lang.String imp)Adds a single import to this page.voidaddImports(java.util.List<java.lang.String> imports)Adds multiple imports to this page.voidaddPrefix(java.lang.String prefix)Adds the given prefix to the set of prefixes of this translation unit.voidaddPrefixMapping(java.lang.String prefix, java.lang.String uri)Maps the given prefix to the given URI.voidaddTaglib(java.lang.String uri, TagLibraryInfo info)Maps the given URI to the given tag library.booleancontainsPrefix(java.lang.String prefix)Checks to see if this translation unit contains the given prefix.java.lang.StringgetAutoFlush()Returns the autoFlush attribute value.BeanRepositorygetBeanRepository()Returns the bean repository for this page.intgetBuffer()Returns the buffer size in bytes.java.lang.StringgetBufferValue()Returns the buffer value.java.lang.StringgetContentType()Returns the content type.java.lang.StringgetDeferredSyntaxAllowedAsLiteral()Returns the deferredSyntaxAllowedAsLiteral attribute value.java.util.Map<java.lang.String,java.lang.Long>getDependants()Returns the map of dependent files.java.lang.StringgetDoctypeName()Returns the DOCTYPE name.java.lang.StringgetDoctypePublic()Returns the DOCTYPE public identifier.java.lang.StringgetDoctypeSystem()Returns the DOCTYPE system identifier.java.lang.StringgetErrorOnELNotFound()Returns the errorOnELNotFound attribute value.java.lang.StringgetErrorPage()Returns the error page URL.ExpressionFactorygetExpressionFactory()Returns the expression factory.java.lang.StringgetExtends()Gets the value of the 'extends' page directive attribute.java.lang.StringgetExtends(boolean useDefault)Gets the value of the 'extends' page directive attribute.java.util.List<java.lang.String>getImports()Returns the list of imports for this page.java.util.Collection<java.lang.String>getIncludeCoda()Returns the collection of include coda files.java.util.Collection<java.lang.String>getIncludePrelude()Returns the collection of include prelude files.java.lang.StringgetInfo()Returns the page info string.java.lang.StringgetIsELIgnored()Returns the isELIgnored attribute value.java.lang.StringgetIsErrorPage()Returns the isErrorPage attribute value.java.lang.StringgetIsThreadSafe()java.lang.StringgetJspFile()Returns the JSP file path.java.lang.StringgetLanguage(boolean useDefault)Returns the language attribute value.MarkgetNonCustomTagPrefix(java.lang.String prefix)Gets the mark for a non-custom tag prefix.java.lang.StringgetOmitXmlDecl()Returns the omit XML declaration setting.java.lang.StringgetSession()Returns the session attribute value.TagLibraryInfogetTaglib(java.lang.String uri)Gets the tag library corresponding to the given URI.java.util.Collection<TagLibraryInfo>getTaglibs()Gets the collection of tag libraries that are associated with a URI.java.lang.StringgetTrimDirectiveWhitespaces()Returns the trimDirectiveWhitespaces attribute value.java.lang.StringgetURI(java.lang.String prefix)Returns the URI to which the given prefix maps.java.util.Set<java.lang.String>getVarInfoNames()Returns the set of variable info names.booleanhasJspRoot()Checks if this page has a JSP root.booleanhasTaglib(java.lang.String uri)Checks to see if the given URI is mapped to a tag library.booleanisAutoFlush()Checks if autoFlush is enabled.booleanisDeferredSyntaxAllowedAsLiteral()Checks if deferred syntax is allowed as literal.booleanisELIgnored()Checks if EL is ignored.booleanisErrorOnELNotFound()Checks if error on EL not found is enabled.booleanisErrorOnUndeclaredNamespace()Checks if error on undeclared namespace is enabled.booleanisErrorPage()Checks if this page is an error page.booleanisJspPrefixHijacked()Checks if the JSP prefix has been hijacked.booleanisPluginDeclared(java.lang.String id)Check if the plugin ID has been previously declared.booleanisScriptingInvalid()Checks if scripting is invalid for this page.booleanisScriptless()Checks if this page is scriptless.booleanisSession()Checks if session is enabled.booleanisTagFile()Checks if this is a tag file.booleanisThreadSafe()booleanisTrimDirectiveWhitespaces()Checks if directive whitespaces are trimmed.voidpopPrefixMapping(java.lang.String prefix)Removes the URI at the top of the stack of URIs to which the given prefix is mapped.voidpushPrefixMapping(java.lang.String prefix, java.lang.String uri)Pushes the given URI onto the stack of URIs to which the given prefix is mapped.voidputNonCustomTagPrefix(java.lang.String prefix, Mark where)Puts a non-custom tag prefix in the map.voidsetAutoFlush(java.lang.String value, Node n, ErrorDispatcher err)Sets the autoFlush attribute.voidsetBufferValue(java.lang.String value, Node n, ErrorDispatcher err)Sets the buffer value.voidsetContentType(java.lang.String value)Sets the content type.voidsetDeferredSyntaxAllowedAsLiteral(boolean isELDeferred)Sets whether deferred syntax is allowed as literal.voidsetDeferredSyntaxAllowedAsLiteral(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir)Sets the deferredSyntaxAllowedAsLiteral attribute.voidsetDoctypeName(java.lang.String doctypeName)Sets the DOCTYPE name.voidsetDoctypePublic(java.lang.String doctypePublic)Sets the DOCTYPE public identifier.voidsetDoctypeSystem(java.lang.String doctypeSystem)Sets the DOCTYPE system identifier.voidsetELIgnored(boolean s)Sets the EL ignored flag.voidsetErrorOnELNotFound(boolean s)Sets the error on EL not found flag.voidsetErrorOnELNotFound(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir)Sets the errorOnELNotFound attribute.voidsetErrorOnUndeclaredNamespace(boolean errorOnUndeclaredNamespace)Sets whether error on undeclared namespace is enabled.voidsetErrorPage(java.lang.String value)Sets the error page URL.voidsetExtends(java.lang.String value)Sets the extends attribute value.voidsetHasJspRoot(boolean s)Sets whether this page has a JSP root.voidsetIncludeCoda(java.util.Collection<java.lang.String> coda)Sets the collection of include coda files.voidsetIncludePrelude(java.util.Collection<java.lang.String> prelude)Sets the collection of include prelude files.voidsetInfo(java.lang.String value)Sets the page info string.voidsetIsELIgnored(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir)Sets the isELIgnored attribute.voidsetIsErrorPage(java.lang.String value, Node n, ErrorDispatcher err)Sets the isErrorPage attribute.voidsetIsJspPrefixHijacked(boolean isHijacked)Sets whether the JSP prefix has been hijacked.voidsetIsThreadSafe(java.lang.String value, Node n, ErrorDispatcher err)voidsetLanguage(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir)Sets the language attribute.voidsetOmitXmlDecl(java.lang.String omit)Sets the omit XML declaration setting.voidsetScriptingInvalid(boolean s)Sets whether scripting is invalid for this page.voidsetScriptless(boolean s)Sets whether this page is scriptless.voidsetSession(java.lang.String value, Node n, ErrorDispatcher err)Sets the session attribute.voidsetTrimDirectiveWhitespaces(boolean trimDirectiveWhitespaces)Sets whether directive whitespaces are trimmed.voidsetTrimDirectiveWhitespaces(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir)Sets the trimDirectiveWhitespaces attribute.
-
-
-
Method Detail
-
isTagFile
public boolean isTagFile()
Checks if this is a tag file.- Returns:
- true if this is a tag file
-
isPluginDeclared
public boolean isPluginDeclared(java.lang.String id)
Check if the plugin ID has been previously declared. Make a note that this Id is now declared.- Parameters:
id- The plugin ID to check- Returns:
- true if Id has been declared.
-
addImports
public void addImports(java.util.List<java.lang.String> imports)
Adds multiple imports to this page.- Parameters:
imports- The imports to add
-
addImport
public void addImport(java.lang.String imp)
Adds a single import to this page.- Parameters:
imp- The import to add
-
getImports
public java.util.List<java.lang.String> getImports()
Returns the list of imports for this page.- Returns:
- The imports list
-
getJspFile
public java.lang.String getJspFile()
Returns the JSP file path.- Returns:
- The JSP file path
-
addDependant
public void addDependant(java.lang.String d, java.lang.Long lastModified)Adds a dependent file to this page.- Parameters:
d- The dependent file pathlastModified- The last modified timestamp
-
getDependants
public java.util.Map<java.lang.String,java.lang.Long> getDependants()
Returns the map of dependent files.- Returns:
- The dependants map
-
getBeanRepository
public BeanRepository getBeanRepository()
Returns the bean repository for this page.- Returns:
- The bean repository
-
setScriptless
public void setScriptless(boolean s)
Sets whether this page is scriptless.- Parameters:
s- true if the page is scriptless
-
isScriptless
public boolean isScriptless()
Checks if this page is scriptless.- Returns:
- true if the page is scriptless
-
setScriptingInvalid
public void setScriptingInvalid(boolean s)
Sets whether scripting is invalid for this page.- Parameters:
s- true if scripting is invalid
-
isScriptingInvalid
public boolean isScriptingInvalid()
Checks if scripting is invalid for this page.- Returns:
- true if scripting is invalid
-
getIncludePrelude
public java.util.Collection<java.lang.String> getIncludePrelude()
Returns the collection of include prelude files.- Returns:
- The include prelude files
-
setIncludePrelude
public void setIncludePrelude(java.util.Collection<java.lang.String> prelude)
Sets the collection of include prelude files.- Parameters:
prelude- The include prelude files
-
getIncludeCoda
public java.util.Collection<java.lang.String> getIncludeCoda()
Returns the collection of include coda files.- Returns:
- The include coda files
-
setIncludeCoda
public void setIncludeCoda(java.util.Collection<java.lang.String> coda)
Sets the collection of include coda files.- Parameters:
coda- The include coda files
-
setHasJspRoot
public void setHasJspRoot(boolean s)
Sets whether this page has a JSP root.- Parameters:
s- true if the page has a JSP root
-
hasJspRoot
public boolean hasJspRoot()
Checks if this page has a JSP root.- Returns:
- true if the page has a JSP root
-
getOmitXmlDecl
public java.lang.String getOmitXmlDecl()
Returns the omit XML declaration setting.- Returns:
- The omit XML declaration value
-
setOmitXmlDecl
public void setOmitXmlDecl(java.lang.String omit)
Sets the omit XML declaration setting.- Parameters:
omit- The omit XML declaration value
-
getDoctypeName
public java.lang.String getDoctypeName()
Returns the DOCTYPE name.- Returns:
- The DOCTYPE name
-
setDoctypeName
public void setDoctypeName(java.lang.String doctypeName)
Sets the DOCTYPE name.- Parameters:
doctypeName- The DOCTYPE name
-
getDoctypeSystem
public java.lang.String getDoctypeSystem()
Returns the DOCTYPE system identifier.- Returns:
- The DOCTYPE system identifier
-
setDoctypeSystem
public void setDoctypeSystem(java.lang.String doctypeSystem)
Sets the DOCTYPE system identifier.- Parameters:
doctypeSystem- The DOCTYPE system identifier
-
getDoctypePublic
public java.lang.String getDoctypePublic()
Returns the DOCTYPE public identifier.- Returns:
- The DOCTYPE public identifier
-
setDoctypePublic
public void setDoctypePublic(java.lang.String doctypePublic)
Sets the DOCTYPE public identifier.- Parameters:
doctypePublic- The DOCTYPE public identifier
-
setIsJspPrefixHijacked
public void setIsJspPrefixHijacked(boolean isHijacked)
Sets whether the JSP prefix has been hijacked.- Parameters:
isHijacked- true if the JSP prefix has been hijacked
-
isJspPrefixHijacked
public boolean isJspPrefixHijacked()
Checks if the JSP prefix has been hijacked.- Returns:
- true if the JSP prefix has been hijacked
-
addPrefix
public void addPrefix(java.lang.String prefix)
Adds the given prefix to the set of prefixes of this translation unit.- Parameters:
prefix- The prefix to add
-
containsPrefix
public boolean containsPrefix(java.lang.String prefix)
Checks to see if this translation unit contains the given prefix.- Parameters:
prefix- The prefix to check- Returns:
- true if this translation unit contains the given prefix
-
addTaglib
public void addTaglib(java.lang.String uri, TagLibraryInfo info)Maps the given URI to the given tag library.- Parameters:
uri- The URI to mapinfo- The tag library to be associated with the given URI
-
getTaglib
public TagLibraryInfo getTaglib(java.lang.String uri)
Gets the tag library corresponding to the given URI.- Parameters:
uri- The URI to look up- Returns:
- Tag library corresponding to the given URI
-
getTaglibs
public java.util.Collection<TagLibraryInfo> getTaglibs()
Gets the collection of tag libraries that are associated with a URI.- Returns:
- Collection of tag libraries
-
hasTaglib
public boolean hasTaglib(java.lang.String uri)
Checks to see if the given URI is mapped to a tag library.- Parameters:
uri- The URI to check- Returns:
- true if the given URI is mapped to a tag library
-
addPrefixMapping
public void addPrefixMapping(java.lang.String prefix, java.lang.String uri)Maps the given prefix to the given URI.- Parameters:
prefix- The prefix to mapuri- The URI to be associated with the given prefix
-
pushPrefixMapping
public void pushPrefixMapping(java.lang.String prefix, java.lang.String uri)Pushes the given URI onto the stack of URIs to which the given prefix is mapped.- Parameters:
prefix- The prefix whose stack of URIs is to be pusheduri- The URI to be pushed onto the stack
-
popPrefixMapping
public void popPrefixMapping(java.lang.String prefix)
Removes the URI at the top of the stack of URIs to which the given prefix is mapped.- Parameters:
prefix- The prefix whose stack of URIs is to be popped
-
getURI
public java.lang.String getURI(java.lang.String prefix)
Returns the URI to which the given prefix maps.- Parameters:
prefix- The prefix whose URI is sought- Returns:
- The URI to which the given prefix maps
-
setLanguage
public void setLanguage(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperExceptionSets the language attribute.- Parameters:
value- The language valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the language is not Java
-
getLanguage
public java.lang.String getLanguage(boolean useDefault)
Returns the language attribute value.- Parameters:
useDefault- Whether to use the default if not set- Returns:
- The language value
-
setExtends
public void setExtends(java.lang.String value)
Sets the extends attribute value.- Parameters:
value- The extends value
-
getExtends
public java.lang.String getExtends(boolean useDefault)
Gets the value of the 'extends' page directive attribute.- Parameters:
useDefault- TRUE if the default (org.apache.jasper.runtime.HttpJspBase) should be returned if this attribute has not been set, FALSE otherwise- Returns:
- The value of the 'extends' page directive attribute, or the default (org.apache.jasper.runtime.HttpJspBase) if this attribute has not been set and useDefault is TRUE
-
getExtends
public java.lang.String getExtends()
Gets the value of the 'extends' page directive attribute.- Returns:
- The value of the 'extends' page directive attribute, or the default (org.apache.jasper.runtime.HttpJspBase) if this attribute has not been set
-
setContentType
public void setContentType(java.lang.String value)
Sets the content type.- Parameters:
value- The content type value
-
getContentType
public java.lang.String getContentType()
Returns the content type.- Returns:
- The content type
-
setBufferValue
public void setBufferValue(java.lang.String value, Node n, ErrorDispatcher err) throws JasperExceptionSets the buffer value.- Parameters:
value- The buffer valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the buffer value is invalid
-
getBufferValue
public java.lang.String getBufferValue()
Returns the buffer value.- Returns:
- The buffer value
-
getBuffer
public int getBuffer()
Returns the buffer size in bytes.- Returns:
- The buffer size
-
setSession
public void setSession(java.lang.String value, Node n, ErrorDispatcher err) throws JasperExceptionSets the session attribute.- Parameters:
value- The session valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the session value is invalid
-
getSession
public java.lang.String getSession()
Returns the session attribute value.- Returns:
- The session value
-
isSession
public boolean isSession()
Checks if session is enabled.- Returns:
- true if session is enabled
-
setAutoFlush
public void setAutoFlush(java.lang.String value, Node n, ErrorDispatcher err) throws JasperExceptionSets the autoFlush attribute.- Parameters:
value- The autoFlush valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the autoFlush value is invalid
-
getAutoFlush
public java.lang.String getAutoFlush()
Returns the autoFlush attribute value.- Returns:
- The autoFlush value
-
isAutoFlush
public boolean isAutoFlush()
Checks if autoFlush is enabled.- Returns:
- true if autoFlush is enabled
-
setIsThreadSafe
public void setIsThreadSafe(java.lang.String value, Node n, ErrorDispatcher err) throws JasperException- Throws:
JasperException
-
getIsThreadSafe
public java.lang.String getIsThreadSafe()
-
isThreadSafe
public boolean isThreadSafe()
-
setInfo
public void setInfo(java.lang.String value)
Sets the page info string.- Parameters:
value- The info string
-
getInfo
public java.lang.String getInfo()
Returns the page info string.- Returns:
- The info string
-
setErrorPage
public void setErrorPage(java.lang.String value)
Sets the error page URL.- Parameters:
value- The error page URL
-
getErrorPage
public java.lang.String getErrorPage()
Returns the error page URL.- Returns:
- The error page URL
-
setIsErrorPage
public void setIsErrorPage(java.lang.String value, Node n, ErrorDispatcher err) throws JasperExceptionSets the isErrorPage attribute.- Parameters:
value- The isErrorPage valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the value is invalid
-
getIsErrorPage
public java.lang.String getIsErrorPage()
Returns the isErrorPage attribute value.- Returns:
- The isErrorPage value
-
isErrorPage
public boolean isErrorPage()
Checks if this page is an error page.- Returns:
- true if this is an error page
-
setIsELIgnored
public void setIsELIgnored(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperExceptionSets the isELIgnored attribute.- Parameters:
value- The isELIgnored valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setErrorOnELNotFound
public void setErrorOnELNotFound(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperExceptionSets the errorOnELNotFound attribute.- Parameters:
value- The errorOnELNotFound valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setDeferredSyntaxAllowedAsLiteral
public void setDeferredSyntaxAllowedAsLiteral(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperExceptionSets the deferredSyntaxAllowedAsLiteral attribute.- Parameters:
value- The deferredSyntaxAllowedAsLiteral valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setTrimDirectiveWhitespaces
public void setTrimDirectiveWhitespaces(java.lang.String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperExceptionSets the trimDirectiveWhitespaces attribute.- Parameters:
value- The trimDirectiveWhitespaces valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setELIgnored
public void setELIgnored(boolean s)
Sets the EL ignored flag.- Parameters:
s- The EL ignored flag
-
getIsELIgnored
public java.lang.String getIsELIgnored()
Returns the isELIgnored attribute value.- Returns:
- The isELIgnored value
-
isELIgnored
public boolean isELIgnored()
Checks if EL is ignored.- Returns:
- true if EL is ignored
-
setErrorOnELNotFound
public void setErrorOnELNotFound(boolean s)
Sets the error on EL not found flag.- Parameters:
s- The error on EL not found flag
-
getErrorOnELNotFound
public java.lang.String getErrorOnELNotFound()
Returns the errorOnELNotFound attribute value.- Returns:
- The errorOnELNotFound value
-
isErrorOnELNotFound
public boolean isErrorOnELNotFound()
Checks if error on EL not found is enabled.- Returns:
- true if error on EL not found is enabled
-
putNonCustomTagPrefix
public void putNonCustomTagPrefix(java.lang.String prefix, Mark where)Puts a non-custom tag prefix in the map.- Parameters:
prefix- The prefixwhere- The mark location
-
getNonCustomTagPrefix
public Mark getNonCustomTagPrefix(java.lang.String prefix)
Gets the mark for a non-custom tag prefix.- Parameters:
prefix- The prefix- Returns:
- The mark location
-
getDeferredSyntaxAllowedAsLiteral
public java.lang.String getDeferredSyntaxAllowedAsLiteral()
Returns the deferredSyntaxAllowedAsLiteral attribute value.- Returns:
- The deferredSyntaxAllowedAsLiteral value
-
isDeferredSyntaxAllowedAsLiteral
public boolean isDeferredSyntaxAllowedAsLiteral()
Checks if deferred syntax is allowed as literal.- Returns:
- true if deferred syntax is allowed as literal
-
setDeferredSyntaxAllowedAsLiteral
public void setDeferredSyntaxAllowedAsLiteral(boolean isELDeferred)
Sets whether deferred syntax is allowed as literal.- Parameters:
isELDeferred- true if deferred syntax is allowed
-
getExpressionFactory
public ExpressionFactory getExpressionFactory()
Returns the expression factory.- Returns:
- The expression factory
-
getTrimDirectiveWhitespaces
public java.lang.String getTrimDirectiveWhitespaces()
Returns the trimDirectiveWhitespaces attribute value.- Returns:
- The trimDirectiveWhitespaces value
-
isTrimDirectiveWhitespaces
public boolean isTrimDirectiveWhitespaces()
Checks if directive whitespaces are trimmed.- Returns:
- true if directive whitespaces are trimmed
-
setTrimDirectiveWhitespaces
public void setTrimDirectiveWhitespaces(boolean trimDirectiveWhitespaces)
Sets whether directive whitespaces are trimmed.- Parameters:
trimDirectiveWhitespaces- true if directive whitespaces are trimmed
-
getVarInfoNames
public java.util.Set<java.lang.String> getVarInfoNames()
Returns the set of variable info names.- Returns:
- The variable info names
-
isErrorOnUndeclaredNamespace
public boolean isErrorOnUndeclaredNamespace()
Checks if error on undeclared namespace is enabled.- Returns:
- true if error on undeclared namespace is enabled
-
setErrorOnUndeclaredNamespace
public void setErrorOnUndeclaredNamespace(boolean errorOnUndeclaredNamespace)
Sets whether error on undeclared namespace is enabled.- Parameters:
errorOnUndeclaredNamespace- true if error on undeclared namespace is enabled
-
-