felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r701012 [4/4] - in /felix/trunk/ipojo: core/src/main/java/org/apache/felix/ipojo/ core/src/main/java/org/apache/felix/ipojo/architecture/ core/src/main/java/org/apache/felix/ipojo/parser/ core/src/main/java/org/apache/felix/ipojo/util/ meta...
Date Thu, 02 Oct 2008 06:30:34 GMT
Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Tracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Tracker.java?rev=701012&r1=701011&r2=701012&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Tracker.java (original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/Tracker.java Wed Oct
 1 23:30:33 2008
@@ -41,55 +41,61 @@
 public class Tracker implements TrackerCustomizer {
 
     /**
-     * Bundle context against which this Tracker object is tracking.
+     * The bundle context against which this Tracker object is tracking.
      */
     protected BundleContext m_context;
 
     /**
-     * Filter specifying search criteria for the services to track.
+     * the filter specifying search criteria for the services to track.
      */
     protected Filter m_filter;
 
     /**
-     * TrackerCustomizer object for this tracker.
+     * The TrackerCustomizer object for this tracker.
      */
     protected TrackerCustomizer m_customizer;
 
     /**
-     * Filter string for use when adding the ServiceListener. If this field is set, then
certain optimizations can be taken since we don't have a user supplied filter.
+     * The filter string for use when adding the ServiceListener.
+     * If this field is set, then certain optimizations can be taken since we don't have
a user supplied filter.
      */
     protected String m_listenerFilter;
 
     /**
-     * Class name to be tracked. If this field is set, then we are tracking by class name.
+     * The class name to be tracked. If this field is set, then we are 
+     * tracking by class name.
      */
     private String m_trackClass;
 
     /**
-     * Reference to be tracked. If this field is set, then we are tracking a single ServiceReference.
+     * The reference to be tracked. If this field is set, then we are 
+     * tracking a single ServiceReference.
      */
     private ServiceReference m_trackReference;
 
     /**
-     * Tracked services: ServiceReference object -> customized. Object and ServiceListener
object
+     * The tracked services: ServiceReference object -> customized. 
+     *Object and ServiceListener object
      */
     private Tracked m_tracked;
 
     /**
-     * Cached ServiceReference for getServiceReference. This field is volatile since it is
accessed by multiple threads.
+     * The cached ServiceReference for getServiceReference. 
+     * This field is volatile since it is accessed by multiple threads.
      */
     private volatile ServiceReference m_cachedReference;
 
     /**
-     * Cached service object for getService. This field is volatile since it is accessed
by multiple threads.
+     * The cached service object for getService. This field is volatile 
+     * since it is accessed by multiple threads.
      */
     private volatile Object m_cachedService;
 
     /**
-     * Create a Tracker object on the specified ServiceReference object.
+     * Creates a Tracker object on the specified ServiceReference object.
      * The service referenced by the specified ServiceReference object will be tracked by
this Tracker.
-     * @param context BundleContext object against which the tracking is done.
-     * @param reference ServiceReference object for the service to be tracked.
+     * @param context The BundleContext object against which the tracking is done.
+     * @param reference The ServiceReference object for the service to be tracked.
      * @param customizer The customizer object to call when services are added, modified,
or removed in this Tracker object. If customizer is null, then this Tracker object will be
used as
      *            the TrackerCustomizer object and the Tracker object will call the TrackerCustomizer
methods on itself.
      */
@@ -111,11 +117,11 @@
     }
 
     /**
-     * Create a Tracker object on the specified class name.
+     * Creates a Tracker object on the specified class name.
      * Services registered under the specified class name will be tracked by this Tracker
object.
-     * @param context BundleContext object against which the tracking is done.
-     * @param clazz Class name of the services to be tracked.
-     * @param customizer The customizer object to call when services are added, modified,
or removed in this Tracker object. If customizer is null, then this Tracker object will be
used as
+     * @param context the BundleContext object against which the tracking is done.
+     * @param clazz the Class name of the services to be tracked.
+     * @param customizer the customizer object to call when services are added, modified,
or removed in this Tracker object. If customizer is null, then this Tracker object will be
used as
      *            the TrackerCustomizer object and the Tracker object will call the TrackerCustomizer
methods on itself.    
      */
     public Tracker(BundleContext context, String clazz, TrackerCustomizer customizer) {
@@ -138,11 +144,11 @@
     }
 
     /**
-     * Create a Tracker object on the specified Filter object.
+     * Creates a Tracker object on the specified Filter object.
      * <p>
      * Services which match the specified Filter object will be tracked by this Tracker object.
-     * @param context BundleContext object against which the tracking is done.
-     * @param filter Filter object to select the services to be tracked.
+     * @param context the BundleContext object against which the tracking is done.
+     * @param filter the Filter object to select the services to be tracked.
      * @param customizer The customizer object to call when services are added, modified,
or removed in this Tracker object. If customizer is null, then this Tracker object will be
used as the
      *            TrackerCustomizer object and the Tracker object will call the TrackerCustomizer
methods on itself.   
      */
@@ -163,7 +169,7 @@
     }
 
     /**
-     * Open this Tracker object and begin tracking services.
+     * Opens this Tracker object and begin tracking services.
      * <p>
      * Services which match the search criteria specified when this Tracker object was created
are now tracked by this Tracker object.
      */
@@ -208,7 +214,7 @@
     }
 
     /**
-     * Close this Tracker object.
+     * Closes this Tracker object.
      * <p>
      * This method should be called when this Tracker object should end the tracking of services.
      */
@@ -240,7 +246,7 @@
      * on the BundleContext object with which this Tracker object was created, passing the
specified ServiceReference object.
      * <p>
      * This method can be overridden in a subclass to customize the service object to be
tracked for the service being added. In that case, take care not to rely on the default implementation
of removedService that will unget the service.
-     * @param reference Reference to service being added to this Tracker object.
+     * @param reference the Reference to service being added to this Tracker object.
      * @return The service object to be tracked for the service added to this Tracker object.
      * @see TrackerCustomizer
      */
@@ -250,7 +256,7 @@
 
     /**
      * Default implementation of the TrackerCustomizer.addedService method.  
-     * @param reference added reference.
+     * @param reference the added reference.
      * @see org.apache.felix.ipojo.util.TrackerCustomizer#addedService(org.osgi.framework.ServiceReference)
      */
     public void addedService(ServiceReference reference) {
@@ -261,7 +267,7 @@
      * Default implementation of the TrackerCustomizer.modifiedService method.
      * <p>
      * This method is only called when this Tracker object has been constructed with a null
TrackerCustomizer argument. The default implementation does nothing.
-     * @param reference Reference to modified service.
+     * @param reference the Reference to modified service.
      * @param service The service object for the modified service.
      * @see TrackerCustomizer
      */
@@ -276,7 +282,7 @@
      * BundleContext object with which this Tracker object was created, passing the specified
ServiceReference object.
      * <p>
      * This method can be overridden in a subclass. If the default implementation of addingService
method was used, this method must unget the service.
-     * @param reference Reference to removed service.
+     * @param reference the Reference to removed service.
      * @param service The service object for the removed service.
      * @see TrackerCustomizer
      */
@@ -285,10 +291,10 @@
     }
 
     /**
-     * Wait for at least one service to be tracked by this Tracker object.
+     * Waits for at least one service to be tracked by this Tracker object.
      * <p>
      * It is strongly recommended that waitForService is not used during the calling of the
BundleActivator methods. BundleActivator methods are expected to complete in a short period
of time.
-     * @param timeout time interval in milliseconds to wait. If zero, the method will wait
indefinately.
+     * @param timeout the time interval in milliseconds to wait. If zero, the method will
wait indefinately.
      * @return Returns the result of getService().
      * @throws InterruptedException If another thread has interrupted the current thread.
      */
@@ -312,8 +318,8 @@
     }
 
     /**
-     * Return an array of ServiceReference objects for all services being tracked by this
Tracker object.
-     * @return Array of ServiceReference objects or null if no service are being tracked.
+     * Returns an array of ServiceReference objects for all services being tracked by this
Tracker object.
+     * @return Array of ServiceReference objects or <code>null</code> if no service
are being tracked.
      */
     public ServiceReference[] getServiceReferences() {
         Tracked tracked = this.m_tracked; // use local var since we are not synchronized
@@ -333,7 +339,7 @@
     }
 
     /**
-     * Get the list of stored service reference.
+     * Gets the list of stored service reference.
      * @return the list containing used service reference
      */
     public List/*<ServiceReference>*/getServiceReferencesList() {
@@ -355,10 +361,10 @@
     }
     
     /**
-     * Return the list of references used by the tracker.
+     * Returns the list of references used by the tracker.
      * A reference becomes used when the dependency has already
-     * call getService on this reference.
-     * @return : the list of used references.
+     * called getService on this reference.
+     * @return the list of used references.
      */
     public List/*<ServiceReference>*/getUsedServiceReferences() {
         Tracked tracked = this.m_tracked; // use local var since we are not synchronized
@@ -402,8 +408,8 @@
 
     /**
      * Returns the service object for the specified ServiceReference object if the referenced
service is being tracked by this Tracker object.
-     * @param reference Reference to the desired service.
-     * @return Service object or null if the service referenced by the specified ServiceReference
object is not being tracked.
+     * @param reference the Reference to the desired service.
+     * @return the Service object or <code>null</code> if the service referenced
by the specified ServiceReference object is not being tracked.
      */
     public Object getService(ServiceReference reference) {
         Tracked tracked = this.m_tracked; // use local var since we are not synchronized
@@ -428,8 +434,8 @@
     }
 
     /**
-     * Unget the given service reference.
-     * @param reference : service reference to unget.
+     * Ungets the given service reference.
+     * @param reference the service reference to unget.
      */
     public void ungetService(ServiceReference reference) {
         Tracked tracked = this.m_tracked; // use local var since we are not synchronized
@@ -446,8 +452,8 @@
     }
 
     /**
-     * Return an array of service objects for all services being tracked by this Tracker
object.
-     * @return Array of service objects or null if no service are being tracked.
+     * Returns an array of service objects for all services being tracked by this Tracker
object.
+     * @return Array of service objects or <code>null</code> if no service are
being tracked.
      */
     public Object[] getServices() {
         Tracked tracked = this.m_tracked; // use local var since we are not synchronized
@@ -474,7 +480,7 @@
      * Returns a service object for one of the services being tracked by this Tracker object.
      * <p>
      * If any services are being tracked, this method returns the result of calling getService(getServiceReference()).
-     * @return Service object or null if no service is being tracked.
+     * @return Service object or <code>null</code> if no service is being tracked.
      */
     public Object getService() {
         Object service = m_cachedService;
@@ -485,9 +491,9 @@
     }
 
     /**
-     * Remove a service from this Tracker object. The specified service will be removed from
this Tracker object. If the specified service was being tracked then the
+     * Removes a service from this Tracker object. The specified service will be removed
from this Tracker object. If the specified service was being tracked then the
      * TrackerCustomizer.removedService method will be called for that service.
-     * @param reference Reference to the service to be removed.
+     * @param reference the Reference to the service to be removed.
      */
     public void remove(ServiceReference reference) {
         Tracked tracked = this.m_tracked; // use local var since we are not synchronized
@@ -498,8 +504,8 @@
     }
 
     /**
-     * Return the number of services being tracked by this Tracker object.
-     * @return Number of services being tracked.
+     * Returns the number of services being tracked by this Tracker object.
+     * @return the Number of services being tracked.
      */
     public int size() {
         Tracked tracked = this.m_tracked; //use local var since we are not synchronized
@@ -521,19 +527,19 @@
         static final long serialVersionUID = -7420065199791006079L;
 
         /**
-         * List of ServiceReferences in the process of being added. This is used to deal
with nesting of ServiceEvents. Since ServiceEvents are synchronously delivered, ServiceEvents
can be nested. For example, when processing the adding of a service
+         * The list of ServiceReferences in the process of being added. This is used to deal
with nesting of ServiceEvents. Since ServiceEvents are synchronously delivered, ServiceEvents
can be nested. For example, when processing the adding of a service
          * and the customizer causes the service to be unregistered, notification to the
nested call to untrack that the service was unregistered can be made to the track method.
Since the ArrayList implementation is not synchronized, all access to
          * this list must be protected by the same synchronized object for thread safety.
          */
         private List m_adding;
 
         /**
-         * true if the tracked object is closed. This field is volatile because it is set
by one thread and read by another.
+         * <code>true</code> if the tracked object is closed. This field is volatile
because it is set by one thread and read by another.
          */
         private volatile boolean m_closed;
 
         /**
-         * Initial list of ServiceReferences for the tracker. This is used to correctly process
the initial services which could become unregistered before they are tracked. This is necessary
since the initial set of tracked services are not
+         * The Initial list of ServiceReferences for the tracker. This is used to correctly
process the initial services which could become unregistered before they are tracked. This
is necessary since the initial set of tracked services are not
          * "announced" by ServiceEvents and therefore the ServiceEvent for unregistration
could be delivered before we track the service. A service must not be in both the initial
and adding lists at the same time. A service must be moved from the
          * initial list to the adding list "atomically" before we begin tracking it. Since
the LinkedList implementation is not synchronized, all access to this list must be protected
by the same synchronized object for thread safety.
          */
@@ -550,7 +556,7 @@
         }
 
         /**
-         * Set initial list of services into tracker before ServiceEvents begin to be received.
This method must be called from Tracker.open while synchronized on this object in the same
synchronized block as the addServiceListener call.
+         * Sets initial list of services into tracker before ServiceEvents begin to be received.
This method must be called from Tracker.open while synchronized on this object in the same
synchronized block as the addServiceListener call.
          * @param references The initial list of services to be tracked.
          */
         protected void setInitialServices(ServiceReference[] references) {
@@ -562,7 +568,7 @@
         }
 
         /**
-         * Track the initial list of services. This is called after ServiceEvents can begin
to be received. This method must be called from Tracker.open while not synchronized on this
object after the addServiceListener call.
+         * Tracks the initial list of services. This is called after ServiceEvents can begin
to be received. This method must be called from Tracker.open while not synchronized on this
object after the addServiceListener call.
          */
         protected void trackInitialServices() {
             while (true) {
@@ -597,7 +603,7 @@
 
         /**
          * ServiceListener method for the Tracker class. This method must NOT be synchronized
to avoid deadlock potential.
-         * @param event ServiceEvent object from the framework.
+         * @param event the ServiceEvent object from the framework.
          */
         public void serviceChanged(ServiceEvent event) {
             //Check if we had a delayed call (which could happen when we close).
@@ -633,8 +639,8 @@
         }
 
         /**
-         * Begin to track the referenced service.
-         * @param reference Reference to a service to be tracked.
+         * Begins to track the referenced service.
+         * @param reference the Reference to a service to be tracked.
          */
         protected void track(ServiceReference reference) {
             Object object;
@@ -665,7 +671,7 @@
 
         /**
          * Common logic to add a service to the tracker used by track and trackInitialServices.
The specified reference must have been placed in the adding list before calling this method.
-         * @param reference Reference to a service to be tracked.
+         * @param reference the Reference to a service to be tracked.
          */
         private void trackAdding(ServiceReference reference) {
             boolean mustBeTracked = false;
@@ -704,8 +710,8 @@
         }
 
         /**
-         * Discontinue tracking the referenced service.
-         * @param reference Reference to the tracked service.
+         * Discontinues tracking the referenced service.
+         * @param reference the Reference to the tracked service.
          */
         protected void untrack(ServiceReference reference) {
             Object object;

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/TrackerCustomizer.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/TrackerCustomizer.java?rev=701012&r1=701011&r2=701012&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/TrackerCustomizer.java
(original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/util/TrackerCustomizer.java
Wed Oct  1 23:30:33 2008
@@ -30,7 +30,7 @@
      * A service is being added to the Tracker object.
      * This method is called before a service which matched the search parameters of the
Tracker object is added to it. This method should return the service object to be tracked
for this ServiceReference object.
      * The returned service object is stored in the Tracker object and is available from
the getService and getServices methods.
-     * @param reference Reference to service being added to the Tracker object.
+     * @param reference the Reference to service being added to the Tracker object.
      * @return The service object to be tracked for the ServiceReference object or null if
the ServiceReference object should not be tracked.
      */
     boolean addingService(ServiceReference reference);
@@ -45,7 +45,7 @@
     /**
      * A service tracked by the Tracker object has been modified.
      * This method is called when a service being tracked by the Tracker object has had it
properties modified.
-     * @param reference Reference to service that has been modified.
+     * @param reference the Reference to service that has been modified.
      * @param service The service object for the modified service.
      */
     void modifiedService(ServiceReference reference, Object service);
@@ -53,7 +53,7 @@
     /**
      * A service tracked by the Tracker object has been removed.
      * This method is called after a service is no longer being tracked by the Tracker object.
-     * @param reference Reference to service that has been removed.
+     * @param reference the Reference to service that has been removed.
      * @param service The service object for the removed service.
      */
     void removedService(ServiceReference reference, Object service);

Modified: felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Attribute.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Attribute.java?rev=701012&r1=701011&r2=701012&view=diff
==============================================================================
--- felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Attribute.java
(original)
+++ felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Attribute.java
Wed Oct  1 23:30:33 2008
@@ -19,31 +19,31 @@
 package org.apache.felix.ipojo.metadata;
 
 /**
- * Attribute.
- * 
+ * An attribute is a key-value pair. It represents the attribute
+ * of XML elements.
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class Attribute {
 
     /**
-     * Name of the attribute.
+     * The name of the attribute.
      */
     private String m_name;
 
     /**
-     * Value of the attribute.
+     * The value of the attribute.
      */
     private String m_value;
 
     /**
-     * Namespace of the attribute.
+     * The namespace of the attribute.
      */
     private String m_nameSpace;
 
     /**
-     * Constructor.
-     * @param name : name of the attribute.
-     * @param value : value of the attribute.
+     * Creates an attribute.
+     * @param name the name of the attribute.
+     * @param value the value of the attribute.
      */
     public Attribute(String name, String value) {
         m_name = name.toLowerCase();
@@ -51,10 +51,10 @@
     }
 
     /**
-     * Constructor.
-     * @param name : name of the attribute.
-     * @param value : value of the attribute.
-     * @param ns : namespace of the attribute.
+     * Creates an attribute.
+     * @param name the name of the attribute.
+     * @param value the value of the attribute.
+     * @param ns the namespace of the attribute.
      */
     public Attribute(String name, String ns, String value) {
         m_name = name.toLowerCase();
@@ -65,7 +65,7 @@
     }
 
     /**
-     * Get the attribute name.
+     * Gets the attribute name.
      * @return the name
      */
     public String getName() {
@@ -73,7 +73,7 @@
     }
 
     /**
-     * Get attribute value.
+     * Gets attribute value.
      * @return the value
      */
     public String getValue() {
@@ -81,7 +81,7 @@
     }
 
     /**
-     * Get attribute namespace.
+     * Gets attribute namespace.
      * @return the namespace
      */
     public String getNameSpace() {

Modified: felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Element.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Element.java?rev=701012&r1=701011&r2=701012&view=diff
==============================================================================
--- felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Element.java
(original)
+++ felix/trunk/ipojo/metadata/src/main/java/org/apache/felix/ipojo/metadata/Element.java
Wed Oct  1 23:30:33 2008
@@ -27,40 +27,41 @@
 import java.util.Set;
 
 /**
- * Element.
- * 
+ * An element represents an XML Element.
+ * It contains a name, a namepace, {@link Attribute} objects
+ * and sub-elements. This class is used to parse iPOJO metadata.
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class Element {
 
     /**
-     * Name of the element.
+     * The name of the element.
      */
     private String m_name;
 
     /**
-     * Name space of the element.
+     * The namespace of the element.
      */
     private String m_nameSpace;
 
     /**
-     * Map of attributes of the element.
-     * The map key is the qualified name of the attribute (ns:name)
+     * The map of attributes of the element (attribute name -> {@link Attribute}).
+     * The map key is the qualified name of the attribute (<code>ns:name</code>)
      * The value is the attribute object.
      */
     private Map m_attributes = new HashMap();
 
     /**
-     * Map of the sub-element of the element.
+     * The map of the sub-element of the element (element name -> {@link Element}.
      * The map key is the element qualified name (ns:name).
      * The value is the array of element of this name.
      */
     private Map m_elements = new HashMap();
 
     /**
-     * Constructor.
-     * @param name : the name of the element
-     * @param ns : the namespace of the element
+     * Creates an Element.
+     * @param name the name of the element
+     * @param ns the namespace of the element
      */
     public Element(String name, String ns) {
         m_name = name.toLowerCase();
@@ -70,7 +71,8 @@
     }
 
     /**
-     * Get sub-elements.
+     * Gets sub-elements.
+     * If no sub-elements, an empty array is returned.
      * @return the sub elements
      */
     public Element[] getElements() {
@@ -87,7 +89,8 @@
     }
 
     /**
-     * Get element attributes.
+     * Gets element attributes.
+     * If no attributes, an empty array is returned.
      * @return the attributes
      */
     public Attribute[] getAttributes() {
@@ -95,7 +98,7 @@
     }
 
     /**
-     * Get element name.
+     * Gets element name.
      * @return the name of the element
      */
     public String getName() {
@@ -103,7 +106,7 @@
     }
 
     /**
-     * Get element namespace.
+     * Gets element namespace.
      * @return the namespace of the element
      */
     public String getNameSpace() {
@@ -111,9 +114,10 @@
     }
 
     /**
-     * Return the value of the attribute given in parameter.
-     * @param name : the name of the searched attribute
-     * @return the value of the attribute given in parameter, null if the attribute does
not exist
+     * Returns the value of the attribute given in parameter.
+     * @param name the name of the searched attribute
+     * @return the value of the attribute given in parameter,
+     * <code>null</code> if the attribute does not exist
      */
     public String getAttribute(String name) {
         name = name.toLowerCase();
@@ -126,10 +130,11 @@
     }
 
     /**
-     * Return the value of the attribute "name" of the namespace "ns".
-     * @param name : name of the attribute to find
-     * @param ns : namespace of the attribute to find
-     * @return the String value of the attribute, or null if the attribute is not found.
+     * Returns the value of the attribute "name" of the namespace "ns".
+     * @param name the name of the attribute to find
+     * @param ns the namespace of the attribute to find
+     * @return the String value of the attribute, or 
+     * <code>null</code> if the attribute is not found.
      */
     public String getAttribute(String name, String ns) {
         name = ns.toLowerCase() + ":" + name.toLowerCase();
@@ -137,7 +142,7 @@
     }
     
     /**
-     * Get the qualified name of the current element.
+     * Gets the qualified name of the current element.
      * @return the qualified name of the current element.
      */
     private String getQualifiedName() {
@@ -149,8 +154,8 @@
     }
 
     /**
-     * Add a sub-element.
-     * @param elem : the element to add
+     * Adds a sub-element.
+     * @param elem the element to add
      */
     public void addElement(Element elem) {
         Element[] array = (Element[]) m_elements.get(elem.getQualifiedName());
@@ -165,8 +170,8 @@
     }
 
     /**
-     * Remove a sub-element.
-     * @param elem : the element to remove
+     * Removes a sub-element.
+     * @param elem the element to remove
      */
     public void removeElement(Element elem) {
         Element[] array = (Element[]) m_elements.get(elem.getQualifiedName());
@@ -197,8 +202,8 @@
     }
 
     /**
-     * Add a attribute.
-     * @param att : the attribute to add
+     * Adds a attribute.
+     * @param att the attribute to add
      */
     public void addAttribute(Attribute att) {
         String name = att.getName().toLowerCase();
@@ -209,8 +214,8 @@
     }
 
     /**
-     * Remove an attribute.
-     * @param att : the attribute to remove
+     * Removes an attribute.
+     * @param att the attribute to remove
      */
     public void removeAttribute(Attribute att) {
         String name = att.getName();
@@ -221,9 +226,10 @@
     }
 
     /**
-     * Get the elements array of the element type given in parameter. This method look for
an empty namespace.
-     * @param name : the type of the element to find (element name)
-     * @return the resulting element array (null if the search failed)
+     * Gets the elements array of the element type given in parameter. 
+     * This method look for an empty namespace.
+     * @param name the type of the element to find (element name)
+     * @return the resulting element array (<code>null</code> if the search failed)
      */
     public Element[] getElements(String name) {
         Element[] elems = (Element[]) m_elements.get(name.toLowerCase());
@@ -231,10 +237,10 @@
     }
 
     /**
-     * Get the elements array of the element type given in parameter.
-     * @param name : the type of the element to find (element name)
-     * @param ns : the namespace of the element
-     * @return the resulting element array (null if the search failed)
+     * Gets the elements array of the element type given in parameter.
+     * @param name the type of the element to find (element name)
+     * @param ns the namespace of the element
+     * @return the resulting element array (<code>null</code> if the search failed)
      */
     public Element[] getElements(String name, String ns) {
         if (ns == null || ns.length() == 0) {
@@ -245,19 +251,19 @@
     }
 
     /**
-     * Is the element contains a sub-element of the type given in parameter.
-     * @param name : type of the element to check.
-     * @return true if the element contains an element of the type "name"
+     * Does the element contain a sub-element of the type given in parameter.
+     * @param name the type of the element to check.
+     * @return <code>true</code> if the element contains an element of the type
"name"
      */
     public boolean containsElement(String name) {
         return m_elements.containsKey(name.toLowerCase());
     }
 
     /**
-     * Is the element contains a sub-element of the type given in parameter. 
-     * @param name : type of the element to check.
-     * @param ns : the namespace of the element to check.
-     * @return true if the element contains an element of the type "name"
+     * Does the element contain a sub-element of the type given in parameter. 
+     * @param name the type of the element to check.
+     * @param ns the namespace of the element to check.
+     * @return <code>true</code> if the element contains an element of the type
"name"
      */
     public boolean containsElement(String name, String ns) {
         if (ns != null && ns.length() != 0) {
@@ -267,16 +273,16 @@
     }
 
     /**
-     * Is the element contains an attribute of the name given in parameter.
-     * @param name : name of the element
-     * @return true if the element contains an attribute of the type "name"
+     * Does the element contain an attribute of the name given in parameter.
+     * @param name the name of the element
+     * @return <code>true</code> if the element contains an attribute of the
type "name"
      */
     public boolean containsAttribute(String name) {
         return m_attributes.containsKey(name.toLowerCase());
     }
     
     /**
-     * Get the XML form of this element.
+     * Gets the XML form of this element.
      * @return the XML snippet representing this element.
      */
     public String toXMLString() {
@@ -285,7 +291,7 @@
 
     /**
      * Internal method to get XML form of an element.
-     * @param indent : indentation to used.
+     * @param indent the indentation to used.
      * @return the XML snippet representing this element.
      */
     private String toXMLString(int indent) {
@@ -343,8 +349,8 @@
 
     /**
      * Internal method to compute the toString method.
-     * @param indent : indentation to use.
-     * @return : the String form of this element.
+     * @param indent the indentation to use.
+     * @return the String form of this element.
      */
     private String toString(int indent) {
         String xml = "";



Mime
View raw message