diff -r 9a793dfeb09d -r 67129b9360d2 jdk/src/share/classes/javax/swing/text/html/parser/DTD.java --- a/jdk/src/share/classes/javax/swing/text/html/parser/DTD.java Mon May 12 14:47:55 2014 +0200 +++ b/jdk/src/share/classes/javax/swing/text/html/parser/DTD.java Fri May 16 17:41:47 2014 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,6 +102,7 @@ /** * Gets an entity by name. + * @param name the entity name * @return the Entity corresponding to the * name String */ @@ -111,6 +112,7 @@ /** * Gets a character entity. + * @param ch the character * @return the Entity corresponding to the * ch character */ @@ -193,13 +195,15 @@ * specified parameters. If one doesn't exist, a new * one is created and returned. * - * @param name the name of the Element - * @param type the type of the Element - * @param omitStart true if start should be omitted - * @param omitEnd true if end should be omitted - * @param content the ContentModel - * @param atts the AttributeList specifying the - * Element + * @param name the name of the Element + * @param type the type of the Element + * @param omitStart true if start should be omitted + * @param omitEnd true if end should be omitted + * @param content the ContentModel + * @param exclusions the set of elements that must not occur inside the element + * @param inclusions the set of elements that can occur inside the element + * @param atts the AttributeList specifying the + * Element * @return the Element specified */ public Element defineElement(String name, int type, @@ -231,6 +235,8 @@ /** * Creates and returns a character Entity. * @param name the entity's name + * @param type the entity's type + * @param ch the entity's value (character) * @return the new character Entity */ public Entity defEntity(String name, int type, int ch) { @@ -241,6 +247,8 @@ /** * Creates and returns an Entity. * @param name the entity's name + * @param type the entity's type + * @param str the entity's data section * @return the new Entity */ protected Entity defEntity(String name, int type, String str) { @@ -252,7 +260,14 @@ /** * Creates and returns an Element. - * @param name the element's name + * @param name the element's name + * @param type the element's type + * @param omitStart {@code true} if the element needs no starting tag + * @param omitEnd {@code true} if the element needs no closing tag + * @param content the element's content + * @param exclusions the elements that must be excluded from the content of the element + * @param inclusions the elements that can be included as the content of the element + * @param atts the attributes of the element * @return the new Element */ protected Element defElement(String name, int type, @@ -280,11 +295,18 @@ } /** - * Creates and returns an AttributeList. - * @param name the attribute list's name + * Creates and returns an AttributeList responding to a new attribute. + * @param name the attribute's name + * @param type the attribute's type + * @param modifier the attribute's modifier + * @param value the default value of the attribute + * @param values the allowed values for the attribute (multiple values could be separated by '|') + * @param atts the previous attribute of the element; to be placed to {@code AttributeList.next}, + * creating a linked list * @return the new AttributeList */ - protected AttributeList defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) { + protected AttributeList defAttributeList(String name, int type, int modifier, + String value, String values, AttributeList atts) { Vector vals = null; if (values != null) { vals = new Vector(); @@ -301,6 +323,8 @@ /** * Creates and returns a new content model. * @param type the type of the new content model + * @param obj the content of the content model + * @param next pointer to the next content model * @return the new ContentModel */ protected ContentModel defContentModel(int type, Object obj, ContentModel next) { @@ -332,6 +356,7 @@ * * @param name the name of the DTD * @return the DTD which corresponds to name + * @throws IOException if an I/O error occurs */ public static DTD getDTD(String name) throws IOException { name = name.toLowerCase(); @@ -359,6 +384,7 @@ /** * Recreates a DTD from an archived format. * @param in the DataInputStream to read from + * @throws IOException if an I/O error occurs */ public void read(DataInputStream in) throws IOException { if (in.readInt() != FILE_VERSION) {