[jboss-cvs] JBossCache/src/org/jboss/cache/xml ...
Manik Surtani
manik at jboss.org
Tue Jul 17 07:07:39 EDT 2007
User: msurtani
Date: 07/07/17 07:07:39
Modified: src/org/jboss/cache/xml XmlHelper.java
Log:
better javadocs
Revision Changes Path
1.17 +29 -11 JBossCache/src/org/jboss/cache/xml/XmlHelper.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: XmlHelper.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/xml/XmlHelper.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- XmlHelper.java 17 Jul 2007 03:14:50 -0000 1.16
+++ XmlHelper.java 17 Jul 2007 11:07:39 -0000 1.17
@@ -32,9 +32,26 @@
public class XmlHelper
{
private static Log log = LogFactory.getLog(XmlHelper.class);
+
+ /**
+ * The root of a JBoss Cache configuration XML file. This is the <tt><mbean></tt> tag.
+ */
public static final String ROOT = "mbean";
+
+ /**
+ * The <tt><attribute></tt> tag which forms the bulk of JBoss Cache configuration elements
+ */
public static final String ATTR = "attribute";
+
+ /**
+ * The <tt><config></tt> tag may be embedded in the contents of an <tt><attribute></tt>, to specify more
+ * complex configuration for certain parameters.
+ */
public static final String CONFIG_ATTR = "config";
+
+ /**
+ * The <tt><name></tt> attribute to an <tt><attribute></tt> tag.
+ */
public static final String NAME = "name";
@@ -42,13 +59,13 @@
* Returns the contents of a specific node of given element name, provided a certain attribute exists and is set to value.
* E.g., if you have a {@link Element} which represents the following XML snippet:
* <pre>
- * >ItemQuantity Colour="Red"<100>/ItemQuantity<
- * >ItemQuantity Colour="Blue"<30>/ItemQuantity<
- * >ItemQuantity Colour="Black"<10>/ItemQuantity<
+ * <ItemQuantity Colour="Red">100</ItemQuantity>
+ * <ItemQuantity Colour="Blue">30</ItemQuantity>
+ * <ItemQuantity Colour="Black">10</ItemQuantity>
* <pre>
* <p/>
* The following results could be expected:
- * <p/>
+ * </p>
* <pre>
* getTagContents(element, "Red", "ItemQuantity", "Colour"); // 100
* getTagContents(element, "Black", "ItemQuantity", "Colour"); // 10
@@ -58,6 +75,7 @@
* </pre>
* <p/>
* None of the parameters should be null - otherwise the method may throw a NullPointerException.
+ * </p>
*
* @param elem - element to search through.
* @param value - expected value to match against
@@ -89,15 +107,15 @@
* Retrieves the value of a given attribute for the first encountered instance of a tag in an element.
* <p/>
* E.g., if you have a {@link Element} which represents the following XML snippet:
- * <p/>
+ * </p>
* <pre>
- * >ItemQuantity Colour="Red"<100>/ItemQuantity<
- * >ItemQuantity Colour="Blue"<30>/ItemQuantity<
- * >ItemQuantity Colour="Black"<10>/ItemQuantity<
+ * <ItemQuantity Colour="Red">100</ItemQuantity>
+ * <ItemQuantity Colour="Blue">30</ItemQuantity>
+ * <ItemQuantity Colour="Black">10</ItemQuantity>
* <pre>
* <p/>
* The following results could be expected:
- * <p/>
+ * </p>
* <pre>
* getAttributeValue(element, "ItemQuantity", "Colour"); // "Red"
* getTagContents(element, "Blah", "Colour"); // null
@@ -257,10 +275,10 @@
* E.g., if you have a {@link Element} which represents the following XML snippet:
* <p/>
* <pre>
- * >props<
+ * <props>
* my.attrib.1 = blah
* my.attrib.2 = blahblah
- * >/props<
+ * </props>
* <pre>
* <p/>
* The following results could be expected:
More information about the jboss-cvs-commits
mailing list