Author: markt Date: Thu Jan 28 20:49:28 2016 New Revision: 1727437 URL: http://svn.apache.org/viewvc?rev=1727437&view=rev Log: Javadoc
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Node.java tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java tomcat/trunk/java/org/apache/jasper/compiler/Parser.java tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Node.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Node.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/Node.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Node.java Thu Jan 28 20:49:28 2016 @@ -230,6 +230,10 @@ abstract class Node implements TagConsta /** * Get the attribute that is non request time expression, either from the * attribute of the node, or from a jsp:attrbute + * + * @param name The name of the attribute + * + * @return The attribute value */ public String getTextAttribute(String name) { @@ -247,12 +251,15 @@ abstract class Node implements TagConsta } /** - * Searches all subnodes of this node for jsp:attribute standard actions - * with the given name, and returns the NamedAttribute node of the matching - * named attribute, nor null if no such node is found. + * Searches all sub-nodes of this node for jsp:attribute standard actions + * with the given name. * <p> * This should always be called and only be called for nodes that accept * dynamic runtime attribute expressions. + * + * @param name The name of the attribute + * @return the NamedAttribute node of the matching named attribute, nor null + * if no such node is found. */ public NamedAttribute getNamedAttributeNode(String name) { NamedAttribute result = null; @@ -518,6 +525,8 @@ abstract class Node implements TagConsta /** * Generates a new temporary variable name. + * + * @return The name to use for the temporary variable */ public String nextTemporaryVariableName() { if (parentRoot == null) { @@ -1701,6 +1710,10 @@ abstract class Node implements TagConsta /** * Checks to see if the attribute of the given name is of type * JspFragment. + * + * @param name The attribute to check + * + * @return {@code true} if it is a JspFragment */ public boolean checkIfAttributeIsJspFragment(String name) { boolean result = false; @@ -1775,12 +1788,12 @@ abstract class Node implements TagConsta } /** - * Returns true if this custom action has an empty body, and false - * otherwise. - * * A custom action is considered to have an empty body if the following * holds true: - getBody() returns null, or - all immediate children are * jsp:attribute actions, or - the action's jsp:body is empty. + * + * @return {@code true} if this custom action has an empty body, and + * {@code false} otherwise. */ public boolean hasEmptyBody() { boolean hasEmptyBody = true; @@ -2054,7 +2067,7 @@ abstract class Node implements TagConsta } /** - * Returns true if this template text contains whitespace only. + * @return true if this template text contains whitespace only. */ public boolean isAllSpace() { boolean isAllSpace = true; @@ -2139,11 +2152,12 @@ abstract class Node implements TagConsta } /** - * Allow node to validate itself + * Allow node to validate itself. + * + * @param ef The expression factory to use to evaluate any EL + * @param ctx The context to use to evaluate any EL * - * @param ef - * @param ctx - * @throws ELException + * @throws ELException If validation fails */ public void validateEL(ExpressionFactory ef, ELContext ctx) throws ELException { @@ -2307,7 +2321,7 @@ abstract class Node implements TagConsta } /** - * <code>true</code> if the attribute is a "dynamic" attribute of a + * @return {@code true} if the attribute is a "dynamic" attribute of a * custom tag that implements DynamicAttributes interface. That is, * a random extra attribute that is not declared by the tag. */ Modified: tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/PageDataImpl.java Thu Jan 28 20:49:28 2016 @@ -58,9 +58,10 @@ class PageDataImpl extends PageData impl private final StringBuilder buf; /** - * Constructor. - * * @param page the page nodes from which to generate the XML view + * @param compiler The compiler for this page + * + * @throws JasperException If an error occurs */ public PageDataImpl(Node.Nodes page, Compiler compiler) throws JasperException { Modified: tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/PageInfo.java Thu Jan 28 20:49:28 2016 @@ -126,8 +126,11 @@ class PageInfo { } /** - * Check if the plugin ID has been previously declared. Make a not + * Check if the plugin ID has been previously declared. Make a note * that this Id is now declared. + * + * @param id The plugin ID to check + * * @return true if Id has been declared. */ public boolean isPluginDeclared(String id) { Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Thu Jan 28 20:49:28 2016 @@ -104,14 +104,20 @@ class Parser implements TagConstants { /** * The main entry for Parser * - * @param pc - * The ParseController, use for getting other objects in compiler + * @param pc The ParseController, use for getting other objects in compiler * and for parsing included pages - * @param reader - * To read the page - * @param parent - * The parent node to this page, null for top level page + * @param reader To read the page + * @param parent The parent node to this page, null for top level page + * @param isTagFile Is the page being parsed a tag file? + * @param directivesOnly Should only directives be parsed? + * @param jar JAR, if any, that this page was loaded from + * @param pageEnc The encoding of the source + * @param jspConfigPageEnc The encoding for the page + * @param isDefaultPageEncoding Is the page encoding the default? + * @param isBomPresent Is a BOM present in the source * @return list of nodes representing the parsed page + * + * @throws JasperException If an error occurs during parsing */ public static Node.Nodes parse(ParserController pc, JspReader reader, Node parent, boolean isTagFile, boolean directivesOnly, @@ -177,6 +183,13 @@ class Parser implements TagConstants { /** * Parse Attributes for a reader, provided for external use + * + * @param pc The parser + * @param reader The source + * + * @return The parsed attributes + * + * @throws JasperException If an error occurs during parsing */ public static Attributes parseAttributes(ParserController pc, JspReader reader) throws JasperException { Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Thu Jan 28 20:49:28 2016 @@ -88,9 +88,14 @@ class ParserController implements TagCon * Parses a JSP page or tag file. This is invoked by the compiler. * * @param inFileName The path to the JSP page or tag file to be parsed. + * + * @return The parsed nodes + * + * @throws JasperException If an error occurs during parsing + * @throws IOException If an I/O error occurs such as the file not being + * found */ - public Node.Nodes parse(String inFileName) - throws FileNotFoundException, JasperException, IOException { + public Node.Nodes parse(String inFileName) throws JasperException, IOException { // If we're parsing a packaged tag file or a resource included by it // (using an include directive), ctxt.getTagFileJar() returns the // JAR file from which to read the tag file or included resource, @@ -105,9 +110,14 @@ class ParserController implements TagCon * compiler. * * @param inFileName The path to the JSP page or tag file to be parsed. + * + * @return The parsed directive nodes + * + * @throws JasperException If an error occurs during parsing + * @throws IOException If an I/O error occurs such as the file not being + * found */ - public Node.Nodes parseDirectives(String inFileName) - throws FileNotFoundException, JasperException, IOException { + public Node.Nodes parseDirectives(String inFileName) throws JasperException, IOException { // If we're parsing a packaged tag file or a resource included by it // (using an include directive), ctxt.getTagFileJar() returns the // JAR file from which to read the tag file or included resource, @@ -125,9 +135,15 @@ class ParserController implements TagCon * @param parent The parent node of the include directive. * @param jar The JAR file from which to read the included resource, * or null of the included resource is to be read from the filesystem + * + * @return The parsed nodes + * + * @throws JasperException If an error occurs during parsing + * @throws IOException If an I/O error occurs such as the file not being + * found */ public Node.Nodes parse(String inFileName, Node parent, Jar jar) - throws FileNotFoundException, JasperException, IOException { + throws JasperException, IOException { // For files that are statically included, isTagfile and directiveOnly // remain unchanged. return doParse(inFileName, parent, jar); @@ -140,9 +156,15 @@ class ParserController implements TagCon * * @param inFileName The name of the tag file to be parsed. * @param jar The location of the tag file. + * + * @return The parsed tage file nodes + * + * @throws JasperException If an error occurs during parsing + * @throws IOException If an I/O error occurs such as the file not being + * found */ public Node.Nodes parseTagFileDirectives(String inFileName, Jar jar) - throws FileNotFoundException, JasperException, IOException { + throws JasperException, IOException { boolean isTagFileSave = isTagFile; boolean directiveOnlySave = directiveOnly; isTagFile = true; Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java Thu Jan 28 20:49:28 2016 @@ -44,18 +44,12 @@ public class SmapStratum { private int outputLineIncrement = 1; private boolean lineFileIDSet = false; - /** - * Sets InputStartLine. - */ public void setInputStartLine(int inputStartLine) { if (inputStartLine < 0) throw new IllegalArgumentException("" + inputStartLine); this.inputStartLine = inputStartLine; } - /** - * Sets OutputStartLine. - */ public void setOutputStartLine(int outputStartLine) { if (outputStartLine < 0) throw new IllegalArgumentException("" + outputStartLine); @@ -67,6 +61,8 @@ public class SmapStratum { * that of prior LineInfo object (in any given context) or 0 * if the current LineInfo has no (logical) predecessor. * <tt>LineInfo</tt> will print this file number no matter what. + * + * @param lineFileID The new line file ID */ public void setLineFileID(int lineFileID) { if (lineFileID < 0) @@ -75,18 +71,12 @@ public class SmapStratum { this.lineFileIDSet = true; } - /** - * Sets InputLineCount. - */ public void setInputLineCount(int inputLineCount) { if (inputLineCount < 0) throw new IllegalArgumentException("" + inputLineCount); this.inputLineCount = inputLineCount; } - /** - * Sets OutputLineIncrement. - */ public void setOutputLineIncrement(int outputLineIncrement) { if (outputLineIncrement < 0) throw new IllegalArgumentException("" + outputLineIncrement); @@ -94,9 +84,9 @@ public class SmapStratum { } /** - * Retrieves the current LineInfo as a String, print all values - * only when appropriate (but LineInfoID if and only if it's been - * specified, as its necessity is sensitive to context). + * @return the current LineInfo as a String, print all values only when + * appropriate (but LineInfoID if and only if it's been + * specified, as its necessity is sensitive to context). */ public String getString() { if (inputStartLine == -1 || outputStartLine == -1) Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1727437&r1=1727436&r2=1727437&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Thu Jan 28 20:49:28 2016 @@ -17,7 +17,6 @@ package org.apache.jasper.compiler; -import java.io.FileNotFoundException; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; @@ -497,8 +496,6 @@ class TagFileProcessor { Node.Nodes page = null; try { page = pc.parseTagFileDirectives(path, jar); - } catch (FileNotFoundException e) { - err.jspError("jsp.error.file.not.found", path); } catch (IOException e) { err.jspError("jsp.error.file.not.found", path); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org