[jbosscache-commits] JBoss Cache SVN: r6219 - core/trunk/src/main/java/org/jboss/cache/config/parsing.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Jul 8 13:15:50 EDT 2008


Author: mircea.markus
Date: 2008-07-08 13:15:50 -0400 (Tue, 08 Jul 2008)
New Revision: 6219

Modified:
   core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java
Log:
enhanced javadoc


Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java	2008-07-08 17:04:46 UTC (rev 6218)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java	2008-07-08 17:15:50 UTC (rev 6219)
@@ -33,28 +33,41 @@
  */
 public abstract class XmlParserBase
 {
+   /**
+    * @see Integer#parseInt(String)
+    */
    protected int getInt(String intStr)
    {
       return Integer.parseInt(intStr);
    }
 
+   /**
+    * @see Long#parseLong(String)
+    */
    protected long getLong(String longStr)
    {
-      return Long.valueOf(longStr);
+      return Long.parseLong(longStr);
    }
 
+   /**
+    * @see Boolean#valueOf(String)
+    */
    protected boolean getBoolean(String str)
    {
       return Boolean.valueOf(str);
    }
 
-
+   /**
+    * Retunrs true if the given value is not empty.
+    */
    protected boolean existsAttribute(String attrValue)
    {
       return attrValue.length() > 0;
    }
 
-
+   /**
+    * Convenient method for retrieving a single element with the give name.
+    */
    protected Element getSingleElement(String elementName, Element parent)
    {
       NodeList nodeList = parent.getElementsByTagName(elementName);
@@ -65,6 +78,11 @@
       return (Element) nodeList.item(0);
    }
 
+   /**
+    * Beside querying the element for it's attribute value, it will look into the value, if any, and replace the
+    * jboss properties(e.g. ${someValue:defaultValue}.
+    * @see StringPropertyReplacer#replaceProperties(value);
+    */
    protected String getAttributeValue(Element element, String attrName)
    {
       String value = element.getAttribute(attrName);




More information about the jbosscache-commits mailing list