You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ds...@apache.org on 2009/09/14 14:16:42 UTC

svn commit: r814602 - in /felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model: ICompoundModelElement.java IModelElement.java IModelWalker.java

Author: dsavage
Date: Mon Sep 14 12:16:41 2009
New Revision: 814602

URL: http://svn.apache.org/viewvc?rev=814602&view=rev
Log:
add javadoc

Modified:
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ICompoundModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelElement.java
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelWalker.java

Modified: felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ICompoundModelElement.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ICompoundModelElement.java?rev=814602&r1=814601&r2=814602&view=diff
==============================================================================
--- felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ICompoundModelElement.java (original)
+++ felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/ICompoundModelElement.java Mon Sep 14 12:16:41 2009
@@ -23,20 +23,54 @@
 import java.util.Set;
 
 
+/**
+ * Represents a model element that is made up of sub model elements.
+ * 
+ * @author dave
+ *
+ */
 public interface ICompoundModelElement extends IModelElement
 {
+    /**
+     * Calls the applicable set/add method of this model to add the element to this part of the model.
+     * 
+     * @param children
+     * @return
+     * @throws InvalidModelException
+     */
     boolean addChild( IModelElement children ) throws InvalidModelException;
 
 
+    /**
+     * Calls the applicable set/remove method of this model to remove the element from this part of the model
+     * @param children
+     * @return
+     */
     boolean removeChild( IModelElement children );
 
 
+    /**
+     * List all direct child elements of this model element.
+     * @return
+     */
     IModelElement[] children();
 
 
+    /**
+     * Visits child elements of this model element, recursing down to sub compound elements when found.
+     * 
+     * @param walker
+     */
     void visit( IModelWalker walker );
 
 
+    /**
+     * Searches the model to find all child model elements which match the specified type
+     * 
+     * @param <T>
+     * @param type
+     * @return
+     */
     <T extends IModelElement> T[] childrenOfType( Class<T> type );
 
 

Modified: felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelElement.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelElement.java?rev=814602&r1=814601&r2=814602&view=diff
==============================================================================
--- felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelElement.java (original)
+++ felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelElement.java Mon Sep 14 12:16:41 2009
@@ -25,8 +25,7 @@
 
 
 /**
- * Descriptors represent static information about component, composite or system. They allow other services to decide
- * how to deal with the given entity without the need to directly interact with the entity.
+ * IModelElement represent static information about a part of a model.
  * 
  * @author dave
  * 
@@ -34,7 +33,7 @@
 public interface IModelElement extends Cloneable
 {
     /**
-     * A brief human readable description of the component, composite or system.
+     * A brief human readable description of the element.
      * 
      * @return
      */
@@ -42,7 +41,7 @@
 
 
     /**
-     * A set of key value pairs designed for use by a machine to classify a particular component, composite or system.
+     * A set of key value pairs designed for use by a machine to classify a particular element.
      * 
      * @return
      */
@@ -51,7 +50,7 @@
 
     /**
      * Set meta data on this descriptor. Meta data is designed for use by a machine to classify or further enhance a
-     * particular component, composite or system.
+     * particular element.
      * 
      * @param meta
      */
@@ -59,7 +58,7 @@
 
 
     /**
-     * Check to see if this descriptor defines a complete set of properties. The definition of what constitutes a
+     * Check to see if this element defines a complete set of properties. The definition of what constitutes a
      * complete set is up to the implementing class.
      * 
      * @throws InvalidModelException

Modified: felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelWalker.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelWalker.java?rev=814602&r1=814601&r2=814602&view=diff
==============================================================================
--- felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelWalker.java (original)
+++ felix/trunk/sigil/common/core/src/org/apache/felix/sigil/model/IModelWalker.java Mon Sep 14 12:16:41 2009
@@ -20,7 +20,22 @@
 package org.apache.felix.sigil.model;
 
 
+/**
+ * Visitor pattern to traverse nodes in the model.
+ * 
+ * @see ICompoundModelElement#visit(IModelWalker);
+ * 
+ * @author dave
+ *
+ */
 public interface IModelWalker
 {
+    /**
+     * Callback method providing the part of the model currently being visited.
+     * 
+     * @param element the element being visited
+     * 
+     * @return true to continue walking the model, false otherwise
+     */
     boolean visit( IModelElement element );
 }