You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ra...@apache.org on 2005/08/21 05:24:37 UTC

svn commit: r234141 [3/4] - in /jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml: ./ env/ model/

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/URLResolver.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/URLResolver.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/URLResolver.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/URLResolver.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,51 +20,60 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.commons.scxml.PathResolver;
 
 /**
  * A PathResolver implementation that resolves against a base URL.
- *  
+ *
  * @see org.apache.commons.scxml.PathResolver
  */
 public class URLResolver implements PathResolver {
-    
-    URL baseURL = null;
-    
+
+    /** Implementation independent log category. */
+    private static Log log = LogFactory.getLog(PathResolver.class);
+
+    /** The base URL to resolve against. */
+    private URL baseURL = null;
+
     /**
-     * @param baseURL
+     * Constructor.
+     *
+     * @param baseURL The base URL to resolve against
      */
-    public URLResolver(URL baseURL) {
+    public URLResolver(final URL baseURL) {
         this.baseURL = baseURL;
     }
-    
+
     /**
-     * Uses URL(URL, String) constructor to combine URL's
+     * Uses URL(URL, String) constructor to combine URL's.
      * @see org.apache.commons.scxml.PathResolver#resolvePath(java.lang.String)
      */
-    public String resolvePath(String ctxPath) {
+    public String resolvePath(final String ctxPath) {
         URL combined;
         try {
             combined = new URL(baseURL, ctxPath);
             return combined.toString();
         } catch (MalformedURLException e) {
-            e.printStackTrace();
+            log.error("Malformed URL", e);
         }
         return null;
     }
-    
+
     /**
      * @see org.apache.commons.scxml.PathResolver#getResolver(java.lang.String)
      */
-    public PathResolver getResolver(String ctxPath) {
+    public PathResolver getResolver(final String ctxPath) {
         URL combined;
         try {
             combined = new URL(baseURL, ctxPath);
             return new URLResolver(combined);
         } catch (MalformedURLException e) {
-            e.printStackTrace();
+            log.error("Malformed URL", e);
         }
         return null;
     }
 
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/package.html
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/package.html?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/package.html (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/package.html Sat Aug 20 20:24:20 2005
@@ -2,7 +2,7 @@
 <!-- 
  *
  *    
- *   Copyright 2004 The Apache Software Foundation.
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Action.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Action.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Action.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Action.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -19,47 +19,48 @@
 
 /**
  * An abstract base class for executable elements in SCXML,
- * such as &lt;assign&gt;, &lt;log&gt; etc. 
- * 
+ * such as &lt;assign&gt;, &lt;log&gt; etc.
+ *
  */
 public abstract class Action {
-    
+
     /**
-     * Link to its parent or container
+     * Link to its parent or container.
      */
     private Executable parent;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Action() {
         super();
     }
-    
+
     /**
-     * Get the Executable parent
-     * 
+     * Get the Executable parent.
+     *
      * @return Returns the parent.
      */
-    public Executable getParent() {
+    public final Executable getParent() {
         return parent;
     }
-    
+
     /**
-     * Set the Executable parent
-     * 
+     * Set the Executable parent.
+     *
      * @param parent The parent to set.
      */
-    public void setParent(Executable parent) {
+    public final void setParent(final Executable parent) {
         this.parent = parent;
     }
 
     /**
-     * Return the parent state
-     * 
+     * Return the parent state.
+     *
      * @return The parent State
+     * @throws ModelException For an unknown TransitionTarget subclass
      */
-    public State getParentState() throws ModelException {
+    public final State getParentState() throws ModelException {
         TransitionTarget tt = parent.getParent();
         if (tt instanceof State) {
             State st = (State) tt;
@@ -73,3 +74,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Assign.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Assign.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Assign.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Assign.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,13 +20,13 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;assign&gt; SCXML element.
- * 
+ *
  */
-public class Assign extends Action {
-    
+public final class Assign extends Action {
+
     /**
-     * Left hand side expression evaluating to a previously 
-     * defined variable
+     * Left hand side expression evaluating to a previously
+     * defined variable.
      */
     private String name;
 
@@ -34,48 +34,49 @@
      * Expression evaluating to the new value of the variable.
      */
     private String expr;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Assign() {
         super();
     }
-    
+
     /**
-     * Get the expr that will evaluate to the new value
-     * 
+     * Get the expr that will evaluate to the new value.
+     *
      * @return Returns the expr.
      */
     public String getExpr() {
         return expr;
     }
-    
+
     /**
-     * Set the expr that will evaluate to the new value
-     * 
+     * Set the expr that will evaluate to the new value.
+     *
      * @param expr The expr to set.
      */
-    public void setExpr(String expr) {
+    public void setExpr(final String expr) {
         this.expr = expr;
     }
-    
+
     /**
-     * Get the variable to be assigned a new value
-     * 
+     * Get the variable to be assigned a new value.
+     *
      * @return Returns the name.
      */
     public String getName() {
         return name;
     }
-    
+
     /**
-     * Get the variable to be assigned a new value
-     * 
+     * Get the variable to be assigned a new value.
+     *
      * @param name The name to set.
      */
-    public void setName(String name) {
+    public void setName(final String name) {
         this.name = name;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Cancel.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Cancel.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Cancel.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Cancel.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,17 +20,17 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;cancel&gt; SCXML element.
- * 
+ *
  */
-public class Cancel extends Action {
-    
+public final class Cancel extends Action {
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Cancel() {
         super();
     }
-    
+
     /**
      * The ID of the send message that should be cancelled.
      */
@@ -38,20 +38,21 @@
 
     /**
      * Get the ID of the send message that should be cancelled.
-     * 
+     *
      * @return Returns the sendId.
      */
     public String getSendId() {
         return sendId;
     }
-    
+
     /**
      * Set the ID of the send message that should be cancelled.
-     * 
+     *
      * @param sendId The sendId to set.
      */
-    public void setSendId(String sendId) {
+    public void setSendId(final String sendId) {
         this.sendId = sendId;
-    }    
-    
+    }
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Else.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Else.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Else.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Else.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,16 +20,17 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;else&gt; SCXML element.
- * 
+ *
  */
 public class Else extends ElseIf {
-    
+
     /**
-     * &lt;else/&gt; is equivalent to &lt;elseif cond="true" /&gt;
+     * &lt;else/&gt; is equivalent to &lt;elseif cond="true" /&gt;.
      */
     public Else() {
         super();
         setCond("true");
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ElseIf.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ElseIf.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ElseIf.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ElseIf.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,38 +20,39 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;elseif&gt; SCXML element.
- * 
+ *
  */
 public class ElseIf extends Action {
-    
+
     /**
      * An conditional expression which can be evaluated to true or false.
      */
     private String cond;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public ElseIf() {
         super();
     }
-    
+
     /**
-     * Get the conditional expression
-     * 
+     * Get the conditional expression.
+     *
      * @return Returns the cond.
      */
-    public String getCond() {
+    public final String getCond() {
         return cond;
     }
-    
+
     /**
-     * Set the conditional expression
-     * 
+     * Set the conditional expression.
+     *
      * @param cond The cond to set.
      */
-    public void setCond(String cond) {
+    public final void setCond(final String cond) {
         this.cond = cond;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Executable.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Executable.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Executable.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Executable.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@
 
 /**
  * An abstract base class for containers of executable elements in SCXML,
- * such as &lt;onentry&gt; and &lt;onexit&gt;. 
- * 
+ * such as &lt;onentry&gt; and &lt;onexit&gt;.
+ *
  */
 public abstract class Executable {
 
@@ -32,57 +32,58 @@
      * Action) that are contained in this Executable.
      */
     private List actions;
-    
+
     /**
-     * The parent container, for traceability
+     * The parent container, for traceability.
      */
-    protected TransitionTarget parent;
-    
+    private TransitionTarget parent;
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Executable() {
         super();
         this.actions = new ArrayList();
     }
-    
+
     /**
-     * Get the executable actions contained in this Executable
-     * 
+     * Get the executable actions contained in this Executable.
+     *
      * @return Returns the actions.
      */
-    public List getActions() {
+    public final List getActions() {
         return actions;
     }
-    
+
     /**
      * Add an Action to the list of executable actions contained in
-     * this Executable
-     * 
+     * this Executable.
+     *
      * @param action The action to add.
      */
-    public void addAction(Action action) {
+    public final void addAction(final Action action) {
         if (action != null) {
             this.actions.add(action);
         }
     }
-    
+
     /**
-     * Get the TransitionTarget parent
-     * 
+     * Get the TransitionTarget parent.
+     *
      * @return Returns the parent.
      */
-    public TransitionTarget getParent() {
+    public final TransitionTarget getParent() {
         return parent;
     }
-    
+
     /**
-     * Set the TransitionTarget parent
-     * 
+     * Set the TransitionTarget parent.
+     *
      * @param parent The parent to set.
      */
-    public void setParent(TransitionTarget parent) {
+    public final void setParent(final TransitionTarget parent) {
         this.parent = parent;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Exit.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Exit.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Exit.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Exit.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -19,63 +19,64 @@
 
 /**
  * The class in this SCXML object model that corresponds to the
- * &lt;exit&gt; SCXML element, which is a shorthand notation for 
+ * &lt;exit&gt; SCXML element, which is a shorthand notation for
  * an empty anonymous final state.
- * 
+ *
  */
 public class Exit extends Action {
 
     /**
-     * The optional expression 
+     * The optional expression.
      */
     private String expr;
-    
+
     /**
-     * The optional namelist
+     * The optional namelist.
      */
     private String namelist;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Exit() {
         super();
     }
-    
+
     /**
-     * Get the expression
-     * 
-     * @return Returns the expr.
+     * Get the expression.
+     *
+     * @return String Returns the expr.
      */
-    public String getExpr() {
+    public final String getExpr() {
         return expr;
     }
-    
+
     /**
-     * Set the expression
-     * 
+     * Set the expression.
+     *
      * @param expr The expr to set.
      */
-    public void setExpr(String expr) {
+    public final void setExpr(final String expr) {
         this.expr = expr;
     }
-    
+
     /**
-     * Get the namelist
-     * 
-     * @return Returns the namelist.
+     * Get the namelist.
+     *
+     * @return String Returns the namelist.
      */
-    public String getNamelist() {
+    public final String getNamelist() {
         return namelist;
     }
-    
+
     /**
-     * Set the namelist
-     * 
+     * Set the namelist.
+     *
      * @param namelist The namelist to set.
      */
-    public void setNamelist(String namelist) {
+    public final void setNamelist(final String namelist) {
         this.namelist = namelist;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ExternalNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ExternalNode.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ExternalNode.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ExternalNode.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,15 +20,16 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * any node in the SCXML document defined in a foreign namespace.
- * 
+ *
  */
 public class ExternalNode {
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public ExternalNode() {
         super();
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/History.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/History.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/History.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/History.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -23,22 +23,22 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;history&gt; SCXML pseudo state element.
- * 
+ *
  */
 public class History extends TransitionTarget {
-    
+
     /**
      * Whether this is a shallow or deep history, the default is shallow.
      */
     private boolean isDeep;
 
     /**
-     * A conditionless transition representing the default history state 
-     * and indicates the state to transition to if the parent state has 
+     * A conditionless transition representing the default history state
+     * and indicates the state to transition to if the parent state has
      * never been entered before.
      */
     private Transition transition;
-    
+
     /**
      * The configuration when the parent of this pseudo state was last
      * exited.
@@ -46,83 +46,86 @@
     private Set lastConfiguration;
 
     /**
-     * Default no-args constructor for XML Digester
+     * Default no-args constructor for XML Digester.
      */
     public History() {
         super();
     }
-    
+
     /**
-     * Get the transition
-     * 
+     * Get the transition.
+     *
      * @return Returns the transition.
      */
-    public Transition getTransition() {
+    public final Transition getTransition() {
         return transition;
     }
-    
+
     /**
-     * Set the transition
-     * 
+     * Set the transition.
+     *
      * @param transition The transition to set.
      */
-    public void setTransition(Transition transition) {
+    public final void setTransition(final Transition transition) {
         this.transition = transition;
     }
-    
+
     /**
-     * Is this history &quot;deep&quot; (as against &quot;shallow&quot;)
-     * 
+     * Is this history &quot;deep&quot; (as against &quot;shallow&quot;).
+     *
      * @return Returns whether this is a &quot;deep&quot; history
      */
-    public boolean isDeep() {
+    public final boolean isDeep() {
         return isDeep;
     }
-    
+
     /**
-     * This method is invoked by XML digester when parsing SCXML markup
-     * 
-     * @param type The history type, which can be &quot;shallow&quot; or 
+     * This method is invoked by XML digester when parsing SCXML markup.
+     *
+     * @param type The history type, which can be &quot;shallow&quot; or
      * &quot;deep&quot;
      */
-    public void setType(String type) {
-        if(type.equals("deep")) {
+    public final void setType(final String type) {
+        if (type.equals("deep")) {
             isDeep = true;
         }
         //shallow is by default
     }
-    
+
     /**
-     * Get the last configuration for this history
-     * 
+     * Get the last configuration for this history.
+     *
      * @return Returns the lastConfiguration.
      */
-    public Set getLastConfiguration() {
+    public final Set getLastConfiguration() {
         return lastConfiguration;
     }
-    
+
     /**
-     * Set the last configuration for this history
-     * 
+     * Set the last configuration for this history.
+     *
      * @param lc The lastConfiguration to set.
      */
-    public void setLastConfiguration(Set lc) {
-        if(this.lastConfiguration == null) {
-            this.lastConfiguration = new HashSet(lc.size());
+    public final void setLastConfiguration(final Set lc) {
+        if (lastConfiguration == null) {
+            lastConfiguration = new HashSet(lc.size());
         } else {
-            this.lastConfiguration.clear();
+            lastConfiguration.clear();
         }
-        this.lastConfiguration.addAll(lc);
+        lastConfiguration.addAll(lc);
     }
-    
+
     /**
-     * Check whether we have prior history
-     * 
+     * Check whether we have prior history.
+     *
      * @return Whether we have a non-empty last configuration
      */
-    public boolean isEmpty() {
-        return (lastConfiguration == null || lastConfiguration.isEmpty()) ?
-                true : false;
+    public final boolean isEmpty() {
+        if (lastConfiguration == null || lastConfiguration.isEmpty()) {
+            return true;
+        }
+        return false;
     }
 
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/If.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/If.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/If.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/If.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -22,14 +22,14 @@
 
 /**
  * The class in this SCXML object model that corresponds to the
- * &lt;if&gt; SCXML element, which serves as a container for conditionally 
- * executed elements. &lt;else&gt; and &lt;elseif&gt; can optionally 
- * appear within an &lt;if&gt; as immediate children, and serve to partition 
- * the elements within an &lt;if&gt;. 
- * 
+ * &lt;if&gt; SCXML element, which serves as a container for conditionally
+ * executed elements. &lt;else&gt; and &lt;elseif&gt; can optionally
+ * appear within an &lt;if&gt; as immediate children, and serve to partition
+ * the elements within an &lt;if&gt;.
+ *
  */
 public class If extends Action {
-    
+
     /**
      * An conditional expression which can be evaluated to true or false.
      */
@@ -40,52 +40,53 @@
      * Action) that are contained in this &lt;if&gt; element.
      */
     private List actions;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public If() {
         super();
         this.actions = new ArrayList();
     }
-    
+
     /**
-     * Get the executable actions contained in this &lt;if&gt;
-     * 
+     * Get the executable actions contained in this &lt;if&gt;.
+     *
      * @return Returns the actions.
      */
-    public List getActions() {
+    public final List getActions() {
         return actions;
     }
 
     /**
      * Add an Action to the list of executable actions contained in
-     * this &lt;if&gt;
-     * 
+     * this &lt;if&gt;.
+     *
      * @param action The action to add.
      */
-    public void addAction(Action action) {
+    public final void addAction(final Action action) {
         if (action != null) {
             this.actions.add(action);
         }
     }
-    
+
     /**
-     * Get the conditional expression
-     * 
+     * Get the conditional expression.
+     *
      * @return Returns the cond.
      */
-    public String getCond() {
+    public final String getCond() {
         return cond;
     }
-    
+
     /**
-     * Set the conditional expression
-     * 
+     * Set the conditional expression.
+     *
      * @param cond The cond to set.
      */
-    public void setCond(String cond) {
+    public final void setCond(final String cond) {
         this.cond = cond;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Initial.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Initial.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Initial.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Initial.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,40 +20,41 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;initial&gt; SCXML pseudo state element.
- * 
+ *
  */
 public class Initial extends TransitionTarget {
-    
+
+    /**
+     * A conditionless transition that is always enabled and will be taken
+     * as soon as the state is entered. The target of the transition must
+     * be a descendant of the parent state of initial.
+     */
+    private Transition transition;
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Initial() {
         super();
     }
-    
-    /**
-     * A conditionless transition that is always enabled and will be taken 
-     * as soon as the state is entered. The target of the transition must 
-     * be a descendant of the parent state of initial.
-     */
-    private Transition transition;
-    
+
     /**
-     * Get the initial transition
-     * 
+     * Get the initial transition.
+     *
      * @return Returns the transition.
      */
-    public Transition getTransition() {
+    public final Transition getTransition() {
         return transition;
     }
-    
+
     /**
-     * Set the initial transition
-     * 
+     * Set the initial transition.
+     *
      * @param transition The transition to set.
      */
-    public void setTransition(Transition transition) {
+    public final void setTransition(final Transition transition) {
         this.transition = transition;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Log.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Log.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Log.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Log.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,62 +20,63 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;log&gt; SCXML element.
- * 
+ *
  */
 public class Log extends Action {
-    
+
     /**
      * An expression evaluating to a string to be logged.
      */
     private String expr;
 
     /**
-     * An expression which returns string which may be used, for example, 
+     * An expression which returns string which may be used, for example,
      * to indicate the purpose of the log.
      */
     private String label;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Log() {
         super();
     }
-    
+
     /**
-     * Get the log expression
-     * 
+     * Get the log expression.
+     *
      * @return Returns the expression.
      */
-    public String getExpr() {
+    public final String getExpr() {
         return expr;
     }
-    
+
     /**
-     * Set the log expression
-     * 
+     * Set the log expression.
+     *
      * @param expr The expr to set.
      */
-    public void setExpr(String expr) {
+    public final void setExpr(final String expr) {
         this.expr = expr;
     }
-    
+
     /**
-     * Get the log label
-     * 
+     * Get the log label.
+     *
      * @return Returns the label.
      */
-    public String getLabel() {
+    public final String getLabel() {
         return label;
     }
-    
+
     /**
-     * Set the log label
-     * 
+     * Set the log label.
+     *
      * @param label The label to set.
      */
-    public void setLabel(String label) {
+    public final void setLabel(final String label) {
         this.label = label;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ModelException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ModelException.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ModelException.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/ModelException.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
 /**
  * Exception that is thrown when the SCXML model supplied to the
  * executor has a fatal flaw that prevents the executor from
- * further interpreting the the model. 
- * 
+ * further interpreting the the model.
+ *
  */
 public class ModelException extends Exception {
 
@@ -36,7 +36,7 @@
      * @see java.lang.Exception#Exception(java.lang.String)
      * @param message
      */
-    public ModelException(String message) {
+    public ModelException(final String message) {
         super(message);
     }
 
@@ -44,18 +44,18 @@
      * @see java.lang.Exception#Exception(java.lang.Throwable)
      * @param cause
      */
-    public ModelException(Throwable cause) {
+    public ModelException(final Throwable cause) {
         super(cause);
     }
-    
+
     /**
-     * @see java.lang.Exception#Exception(java.lang.String, java.lang.Throwable)
+     * @see java.lang.Exception#Exception(String, java.lang.Throwable)
      * @param message
      * @param cause
      */
-    public ModelException(String message, Throwable cause) {
+    public ModelException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
-
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnEntry.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnEntry.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnEntry.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnEntry.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -19,18 +19,19 @@
 
 /**
  * The class in this SCXML object model that corresponds to the
- * &lt;onentry&gt; SCXML element, which is an optional property 
+ * &lt;onentry&gt; SCXML element, which is an optional property
  * holding executable content to be run upon entering the parent
  * State or Parallel.
- * 
+ *
  */
 public class OnEntry extends Executable {
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public OnEntry() {
         super();
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnExit.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnExit.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnExit.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/OnExit.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -19,18 +19,19 @@
 
 /**
  * The class in this SCXML object model that corresponds to the
- * &lt;onexit&gt; SCXML element, which is an optional property 
+ * &lt;onexit&gt; SCXML element, which is an optional property
  * holding executable content to be run upon exiting the parent
  * State or Parallel.
- * 
+ *
  */
 public class OnExit extends Executable {
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public OnExit() {
         super();
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Parallel.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Parallel.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Parallel.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Parallel.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -22,47 +22,47 @@
 
 /**
  * The class in this SCXML object model that corresponds to the
- * &lt;parallel&gt; SCXML element, which is a wrapper element to 
- * encapsulate parallel state machines. For the &lt;parallel&gt; element 
- * to be useful, each of its &lt;state&gt; substates must itself be  
+ * &lt;parallel&gt; SCXML element, which is a wrapper element to
+ * encapsulate parallel state machines. For the &lt;parallel&gt; element
+ * to be useful, each of its &lt;state&gt; substates must itself be
  * complex, that is, one with either &lt;state&gt; or &lt;parallel&gt;
  * children.
- * 
+ *
  */
 public class Parallel extends TransitionTarget {
-    
+
     /**
      * The set of parallel state machines contained in this &lt;parallel&gt;.
      */
     private Set states;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Parallel() {
         this.states = new HashSet();
     }
-    
+
     /**
      * Get the set of parallel state machines contained in this Parallel.
-     * 
+     *
      * @return Returns the state.
      */
-    public Set getStates() {
+    public final Set getStates() {
         return states;
     }
-    
+
     /**
-     * Add a State to the list of parallel state machines contained 
+     * Add a State to the list of parallel state machines contained
      * in this Parallel.
-     * 
+     *
      * @param state The state to add.
      */
-    public void addState(State state) {
+    public final void addState(final State state) {
         if (state != null) {
             this.states.add(state);
         }
     }
-    
+
 }
 

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Path.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Path.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Path.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Path.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -26,20 +26,44 @@
 
 /**
  * A helper class for this SCXML implementation that represents the
- * location of an entity in the SCXML document.
- * 
+ * path taken to transition from one TransitionTarget to another in
+ * the SCXML document.
+ *
+ * The Path consists of the &quot;up segment&quot; that traces up to
+ * the least common ancestor and a &quot;down segment&quot; that traces
+ * down to the target of the Transition.
+ *
  */
 public class Path {
 
+    /**
+     * The list of TransitionTargets in the &quot;up segment&quot;.
+     */
     private List upSeg = new ArrayList();
 
+    /**
+     * The list of TransitionTargets in the &quot;down segment&quot;.
+     */
     private List downSeg = new ArrayList();
 
+    /**
+     * &quot;Lowest&quot; state which is not being exited nor entered by
+     * the transition.
+     */
     private State scope = null;
 
+    /**
+     * Whether the path crosses region border(s).
+     */
     private boolean crossRegion = false;
 
-    Path(TransitionTarget source, TransitionTarget target) {
+    /**
+     * Constructor.
+     *
+     * @param source The source TransitionTarget
+     * @param target The target TransitionTarget
+     */
+    Path(final TransitionTarget source, final TransitionTarget target) {
         if (target == null) {
             //a local "stay" transition
             scope = (State) source;
@@ -85,15 +109,15 @@
      * @return true when the path crosses a region border(s)
      * @see State#isRegion()
      */
-    public boolean isCrossRegion() {
+    public final boolean isCrossRegion() {
         return crossRegion;
     }
 
     /**
-     * @return a list of exited regions sorted bottom-up; no order defined for
-     *         siblings
+     * @return List a list of exited regions sorted bottom-up;
+     *         no order defined for siblings
      */
-    public List getRegionsExited() {
+    public final List getRegionsExited() {
         LinkedList ll = new LinkedList();
         for (Iterator i = upSeg.iterator(); i.hasNext();) {
             Object o = i.next();
@@ -108,10 +132,10 @@
     }
 
     /**
-     * @return a list of entered regions sorted top-down; no order defined for
-     *         siblings
+     * @return List a list of entered regions sorted top-down; no order
+     *         defined for siblings
      */
-    public List getRegionsEntered() {
+    public final List getRegionsEntered() {
         LinkedList ll = new LinkedList();
         for (Iterator i = downSeg.iterator(); i.hasNext();) {
             Object o = i.next();
@@ -126,25 +150,25 @@
     }
 
     /**
-     * @return scope of the transition path, null means global transition (SCXML
-     *         document level) Scope is the least state which is not being
-     *         exited nor entered by the transition.
+     * @return State scope of the transition path, null means global transition
+     *         (SCXML document level) Scope is the least state which is not
+     *         being exited nor entered by the transition.
      */
-    public State getScope() {
+    public final State getScope() {
         return scope;
     }
 
     /**
-     * @return upward segment of the path up to the scope
+     * @return List upward segment of the path up to the scope
      */
-    public List getUpwardSegment() {
+    public final List getUpwardSegment() {
         return upSeg;
     }
 
     /**
-     * @return downward segment from the scope to the target
+     * @return List downward segment from the scope to the target
      */
-    public List getDownwardSegment() {
+    public final List getDownwardSegment() {
         return downSeg;
     }
 }

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/SCXML.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/SCXML.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/SCXML.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/SCXML.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,228 +30,229 @@
  * The class in this SCXML object model that corresponds to the
  * &lt;scxml&gt; root element, and serves as the &quot;document
  * root&quot;. It is also associated with the root Context, via which
- * the SCXMLExecutor may access and the query state of the host 
+ * the SCXMLExecutor may access and the query state of the host
  * environment.
- * 
+ *
  */
 public class SCXML implements Observable {
 
     /**
-     * The SCXML XMLNS
+     * The SCXML XMLNS.
      */
     public static final String XMLNS = "http://www.w3.org/2005/01/SCXML";
-    
+
     /**
      * The xmlns attribute on the root &lt;smxml&gt; element.
      * This must match XMLNS above.
      */
     private String xmlns;
-    
+
     /**
      * The SCXML version of this document.
      */
     private String version;
 
     /**
-     * The initial State for the SCXML executor
+     * The initial State for the SCXML executor.
      */
     private State initialState;
 
     /**
-     * The initial state ID (used by XML Digester only)
+     * The initial state ID (used by XML Digester only).
      */
     private transient String initialstate;
 
     /**
-     * The immediate child states of this SCXML document root
+     * The immediate child states of this SCXML document root.
      */
     private Map states;
-    
+
     /**
-     * The notification registry
+     * The notification registry.
      */
     private NotificationRegistry notifReg;
 
     /**
      * A global map of all States and Parallels associated with this
-     * state machine, keyed by their id 
+     * state machine, keyed by their id.
      */
     private Map targets;
 
     /**
-     * The root Context which interfaces with the host environment
+     * The root Context which interfaces with the host environment.
      */
     private Context rootContext;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
-    public SCXML() { 
+    public SCXML() {
         this.states = new HashMap();
         this.notifReg = new NotificationRegistry();
         this.targets = new HashMap();
     }
-    
+
     /**
-     * Get the initial State
-     * 
-     * @return Returns the initialstate.
+     * Get the initial State.
+     *
+     * @return State Returns the initialstate.
      */
-    public State getInitialState() {
+    public final State getInitialState() {
         return initialState;
     }
-    
+
     /**
-     * Set the initial State
-     * 
-     * @param initialstate The initialstate to set.
+     * Set the initial State.
+     *
+     * @param initialState The initialstate to set.
      */
-    public void setInitialState(State initialState) {
+    public final void setInitialState(final State initialState) {
         this.initialState = initialState;
     }
-    
+
     /**
-     * Get the children states
-     * 
-     * @return Returns the states.
+     * Get the children states.
+     *
+     * @return Map Returns map of the child states.
      */
-    public Map getStates() {
+    public final Map getStates() {
         return states;
     }
-    
+
     /**
-     * Add a child state
-     * 
+     * Add a child state.
+     *
      * @param state The state to be added to the states Map.
      */
-    public void addState(State state) {
+    public final void addState(final State state) {
         states.put(state.getId(), state);
     }
-    
+
     /**
-     * Get the targets map, whichis a Map of all States and Parallels 
-     * associated with this state machine, keyed by their id
-     * 
-     * @return Returns the targets.
+     * Get the targets map, whichis a Map of all States and Parallels
+     * associated with this state machine, keyed by their id.
+     *
+     * @return Map Returns the targets.
      */
-    public Map getTargets() {
+    public final Map getTargets() {
         return targets;
     }
-    
+
     /**
-     * Add a target to this SCXML document
-     * 
+     * Add a target to this SCXML document.
+     *
      * @param target The target to be added to the targets Map.
      */
-    public void addTarget(TransitionTarget target) {
+    public final void addTarget(final TransitionTarget target) {
         String id = target.getId();
         if (!SCXMLHelper.isStringEmpty(id)) {
             // Target is not anonymous, so makes sense to map it
             targets.put(id, target);
         }
-    }    
-    
+    }
+
     /**
-     * Get the SCXML document version
-     * 
+     * Get the SCXML document version.
+     *
      * @return Returns the version.
      */
-    public String getVersion() {
+    public final String getVersion() {
         return version;
     }
-    
+
     /**
-     * Set the SCXML document version
-     * 
+     * Set the SCXML document version.
+     *
      * @param version The version to set.
      */
-    public void setVersion(String version) {
+    public final void setVersion(final String version) {
         this.version = version;
     }
-    
+
     /**
-     * Get the xmlns of this SCXML document
-     * 
+     * Get the xmlns of this SCXML document.
+     *
      * @return Returns the xmlns.
      */
-    public String getXmlns() {
+    public final String getXmlns() {
         return xmlns;
     }
-    
+
     /**
-     * Set the xmlns of this SCXML document
-     * 
+     * Set the xmlns of this SCXML document.
+     *
      * @param xmlns The xmlns to set.
      */
-    public void setXmlns(String xmlns) {
+    public final void setXmlns(final String xmlns) {
         this.xmlns = xmlns;
     }
 
     /**
-     * Get the notification registry
-     * 
-     * @return Returns the notifReg.
+     * Get the notification registry.
+     *
+     * @return NotificationRegistry Returns the notifReg.
      */
-    public NotificationRegistry getNotificationRegistry() {
+    public final NotificationRegistry getNotificationRegistry() {
         return notifReg;
     }
-    
+
     /**
-     * Get the ID of the initial state
-     * 
-     * @return Returns the initial state ID (used by XML Digester only).
+     * Get the ID of the initial state.
+     *
+     * @return String Returns the initial state ID (used by XML Digester only).
      * @see #getInitialState()
      */
-    public String getInitialstate() {
+    public final String getInitialstate() {
         return initialstate;
     }
-    
+
     /**
-     * Set the ID of the initial state
-     * 
+     * Set the ID of the initial state.
+     *
      * @param initialstate The initial state ID (used by XML Digester only).
      * @see #setInitialState(State)
      */
-    public void setInitialstate(String initialstate) {
+    public final void setInitialstate(final String initialstate) {
         this.initialstate = initialstate;
     }
-    
+
     /**
-     * Get the root Context for this document
-     * 
+     * Get the root Context for this document.
+     *
      * @return Returns the rootContext.
      */
-    public Context getRootContext() {
+    public final Context getRootContext() {
         return rootContext;
     }
-    
+
     /**
-     * Set the root Context for this document
-     * 
+     * Set the root Context for this document.
+     *
      * @param rootContext The rootContext to set.
      */
-    public void setRootContext(Context rootContext) {
+    public final void setRootContext(final Context rootContext) {
         this.rootContext = rootContext;
     }
 
     /**
-     * Register a listener to this document root
-     * 
+     * Register a listener to this document root.
+     *
      * @param lst The SCXMLListener to add
      * Remarks: Only valid if StateMachine is non null!
      */
-    public void addListener(SCXMLListener lst) {
+    public final void addListener(final SCXMLListener lst) {
         notifReg.addListener(this, lst);
     }
 
     /**
-     * Deregister a listener from this document root
-     * 
+     * Deregister a listener from this document root.
+     *
      * @param lst The SCXMLListener to remove
      * Remarks: Only valid if StateMachine is non null!
      */
-    public void removeListener(SCXMLListener lst) {
+    public final void removeListener(final SCXMLListener lst) {
         notifReg.removeListener(this, lst);
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Send.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -23,170 +23,171 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;send&gt; SCXML element.
- * 
+ *
  */
 public class Send extends Action {
-    
+
     /**
-     * The ID of the send message
+     * The ID of the send message.
      */
     private String sendId;
-    
+
     /**
-     * An expression returning the target location of the event
+     * An expression returning the target location of the event.
      */
     private String target;
 
     /**
-     * The type of the Event I/O Processor that the event
+     * The type of the Event I/O Processor that the event.
      * should be dispatched to
      */
     private String targetType;
 
     /**
-     * The event is dispatched after the delay interval elapses
+     * The event is dispatched after the delay interval elapses.
      */
     private String delay;
 
     /**
-     * The data containing information which may be used by the 
-     * implementing platform to configure the event processor
+     * The data containing information which may be used by the
+     * implementing platform to configure the event processor.
      */
     private String hints;
 
     /**
-     * The namelist to the sent
+     * The namelist to the sent.
      */
     private String namelist;
 
     /**
-     * The list of external nodes associated with this &lt;send&gt; element
+     * The list of external nodes associated with this &lt;send&gt; element.
      */
     private List externalNodes;
 
     /**
-     * The type of event being generated
+     * The type of event being generated.
      */
     private String event;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Send() {
         super();
         this.externalNodes = new ArrayList();
     }
-    
+
     /**
      * @return Returns the delay.
      */
-    public String getDelay() {
+    public final String getDelay() {
         return delay;
     }
-    
+
     /**
      * @param delay The delay to set.
      */
-    public void setDelay(String delay) {
+    public final void setDelay(final String delay) {
         this.delay = delay;
     }
-    
+
     /**
-     * @return Returns the externalnode.
+     * @return List Returns the list of externalnodes.
      */
-    public List getExternalNodes() {
+    public final List getExternalNodes() {
         return externalNodes;
     }
-    
+
     /**
-     * @param externalnode The externalnode to set.
+     * @param externalNodes The externalnode to set.
      */
-    public void setExternalNodes(List externalNodes) {
+    public final void setExternalNodes(final List externalNodes) {
         this.externalNodes = externalNodes;
     }
-    
+
     /**
-     * @return Returns the hints.
+     * @return String Returns the hints.
      */
-    public String getHints() {
+    public final String getHints() {
         return hints;
     }
-    
+
     /**
      * @param hints The hints to set.
      */
-    public void setHints(String hints) {
+    public final void setHints(final String hints) {
         this.hints = hints;
     }
-    
+
     /**
-     * @return Returns the namelist.
+     * @return String Returns the namelist.
      */
-    public String getNamelist() {
+    public final String getNamelist() {
         return namelist;
     }
-    
+
     /**
      * @param namelist The namelist to set.
      */
-    public void setNamelist(String namelist) {
+    public final void setNamelist(final String namelist) {
         this.namelist = namelist;
     }
-    
+
     /**
-     * @return Returns the sendId.
+     * @return String Returns the sendId.
      */
-    public String getSendId() {
+    public final String getSendId() {
         return sendId;
     }
-    
+
     /**
      * @param sendId The sendId to set.
      */
-    public void setSendId(String sendId) {
+    public final void setSendId(final String sendId) {
         this.sendId = sendId;
     }
-    
+
     /**
-     * @return Returns the target.
+     * @return String Returns the target.
      */
-    public String getTarget() {
+    public final String getTarget() {
         return target;
     }
-    
+
     /**
      * @param target The target to set.
      */
-    public void setTarget(String target) {
+    public final void setTarget(final String target) {
         this.target = target;
     }
-    
+
     /**
-     * @return Returns the targetType.
+     * @return String Returns the targetType.
      */
-    public String getTargetType() {
+    public final String getTargetType() {
         return targetType;
     }
-    
+
     /**
      * @param targetType The targetType to set.
      */
-    public void setTargetType(String targetType) {
+    public final void setTargetType(final String targetType) {
         this.targetType = targetType;
     }
 
     /**
      * @param event The event to set.
      */
-    public void setEvent(String event) {
+    public final void setEvent(final String event) {
         this.event = event;
     }
 
     /**
-     * @return Returns the event.
+     * @return String Returns the event.
      */
-    public String getEvent() {
+    public final String getEvent() {
         return event;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/State.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/State.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/State.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/State.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -28,60 +28,60 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;state&gt; SCXML element.
- * 
+ *
  */
 public class State extends TransitionTarget {
 
     /**
-     * The Context in which any expressions will be evaluated
+     * The Context in which any expressions will be evaluated.
      */
     private Context context;
 
     /**
-     * The Map containing immediate children of this State, keyed by 
+     * The Map containing immediate children of this State, keyed by
      * their IDs. Incompatible with the parallel property.
      */
     private Map children;
 
     /**
-     * The Parallel child, which defines a set of parallel substates. 
+     * The Parallel child, which defines a set of parallel substates.
      * May occur 0 or 1 times. Incompatible with the state property.
      */
     private Parallel parallel;
 
     /**
-     * Boolean property indicating whether this is a final state or not. 
-     * Default value is false . Final states may not have substates or 
+     * Boolean property indicating whether this is a final state or not.
+     * Default value is false . Final states may not have substates or
      * outgoing transitions.
      */
     private boolean isFinal;
 
     /**
-     * A child which identifies initial state for state machines that 
+     * A child which identifies initial state for state machines that
      * have substates.
      */
     private Initial initial;
 
     /**
-     * A map of outgoing Transitions from this state
+     * A map of outgoing Transitions from this state.
      */
     private Map transitions;
 
     /**
      * List of history states owned by a given state (applies to non-leaf
-     * states)
+     * states).
      */
     private List history;
-    
+
     /**
-     * Applies to composite states only. If one of its final children is 
+     * Applies to composite states only. If one of its final children is
      * active, its parent is marked done. This property is reset upon
      * re-entry.
      */
     private boolean done = false;
 
     /**
-     * Constructor
+     * Constructor.
      */
     public State() {
         this.children = new HashMap();
@@ -90,108 +90,109 @@
     }
 
     /**
-     * Get the Context
-     * 
-     * @return Returns the context.
+     * Get the Context.
+     *
+     * @return Context Returns the context.
      */
-    public Context getContext() {
+    public final Context getContext() {
         return context;
     }
 
     /**
-     * Set the Context
-     * 
+     * Set the Context.
+     *
      * @param context
      *            The context to set.
      */
-    public void setContext(Context context) {
+    public final void setContext(final Context context) {
         this.context = context;
     }
 
     /**
-     * Is this state a &quot;final&quot; state
-     * 
-     * @return Returns the isFinal.
+     * Is this state a &quot;final&quot; state.
+     *
+     * @return boolean Returns the isFinal.
      */
-    public boolean getIsFinal() {
+    public final boolean getIsFinal() {
         return isFinal;
     }
 
     /**
-     * Set whether this is a &quot;final&quot; state
-     * 
+     * Set whether this is a &quot;final&quot; state.
+     *
      * @param isFinal
      *            The isFinal to set.
      */
-    public void setIsFinal(boolean isFinal) {
+    public final void setIsFinal(final boolean isFinal) {
         this.isFinal = isFinal;
     }
 
     /**
-     * Get the Parallel child (may be null)
-     * 
-     * @return Returns the parallel.
+     * Get the Parallel child (may be null).
+     *
+     * @return Parallel Returns the parallel.
      */
-    public Parallel getParallel() {
+    public final Parallel getParallel() {
         return parallel;
     }
 
     /**
-     * Set the Parallel child 
-     * 
+     * Set the Parallel child.
+     *
      * @param parallel
      *            The parallel to set.
      */
-    public void setParallel(Parallel parallel) {
+    public final void setParallel(final Parallel parallel) {
         this.parallel = parallel;
     }
 
     /**
-     * Get the initial state
-     * 
-     * @return Returns the target.
+     * Get the initial state.
+     *
+     * @return Initial Returns the initial state.
      */
-    public Initial getInitial() {
+    public final Initial getInitial() {
         return initial;
     }
 
     /**
-     * Set the initial state
-     * 
+     * Set the initial state.
+     *
      * @param target
      *            The target to set.
      */
-    public void setInitial(Initial target) {
+    public final void setInitial(final Initial target) {
         this.initial = target;
     }
 
     /**
-     * Get the map of all outgoing transitions from this state
-     * 
-     * @return Returns the transitions Map.
+     * Get the map of all outgoing transitions from this state.
+     *
+     * @return Map Returns the transitions Map.
      */
-    public Map getTransitions() {
+    public final Map getTransitions() {
         return transitions;
     }
 
     /**
      * Get the map of all outgoing transitions from this state, which
      * will be fired on the given event.
-     * 
-     * @return Returns the transition for given event.
+     *
+     * @param event The event
+     * @return Transition Returns the transition for given event
      */
-    public Transition getTransition(String event) {
+    public final Transition getTransition(final String event) {
         return (Transition) transitions.get(event);
     }
 
     /**
      * Add a transition to the map of all outgoing transitions for
-     * this state
-     * 
+     * this state.
+     *
      * @param transition
      *            The transitions to set.
      */
-    public void addTransition(Transition transition) {
+    public final void addTransition(final Transition transition) {
         String event = transition.getEvent();
         if (!transitions.containsKey(event)) {
             List eventTransitions = new ArrayList();
@@ -203,126 +204,141 @@
     }
 
     /**
-     * Get the map of child states (may be empty)
-     * 
-     * @return Returns the children.
+     * Get the map of child states (may be empty).
+     *
+     * @return Map Returns the children.
      */
-    public Map getChildren() {
+    public final Map getChildren() {
         return children;
     }
 
     /**
-     * Add a child state
-     * 
+     * Add a child state.
+     *
      * @param state
      *            a child state
      */
-    public void addChild(State state) {
+    public final void addChild(final State state) {
         this.children.put(state.getId(), state);
         state.setParent(this);
     }
 
     /**
-     * Get the outgoing transitions for this state as a java.util.List
-     * 
-     * @return Returns the transitions (as a list). TODO - Check in next
+     * Get the outgoing transitions for this state as a java.util.List.
+     *
+     * @return List Returns the transitions (as a list). TODO - Check in next
      *         iteration whether both methods need to be retained.
      */
-    public List getTransitionsList() {
+    public final List getTransitionsList() {
         // Each call creates a new List, this will change once TO-DO is handled
         List transitionsList = new ArrayList();
-        for (Iterator iter = transitions.keySet().iterator(); iter.hasNext();) {
+        for (Iterator iter = transitions.keySet().iterator();
+                iter.hasNext();) {
             transitionsList.addAll((List) transitions.get(iter.next()));
         }
         return transitionsList;
     }
 
     /**
-     * This method is used by XML digester
-     * 
+     * This method is used by XML digester.
+     *
      * @param h
      *            History pseudo state
      */
-    public void addHistory(History h) {
+    public final void addHistory(final History h) {
         history.add(h);
     }
 
     /**
-     * Does this state have a history pseudo state
-     * 
-     * @return true if a given state contains at least one history pseudo state
+     * Does this state have a history pseudo state.
+     *
+     * @return boolean true if a given state contains at least one
+     *                 history pseudo state
      */
-    public boolean hasHistory() {
+    public final boolean hasHistory() {
         return (!history.isEmpty());
     }
 
     /**
-     * Get the list of history pseudo states for this state
-     * 
+     * Get the list of history pseudo states for this state.
+     *
      * @return a list of all history pseudo states contained by a given state
      *         (can be empty)
      * @see #hasHistory()
      */
-    public List getHistory() {
+    public final List getHistory() {
         return history;
     }
 
     /**
-     * Check whether this is a simple (leaf) state (UML terminology) 
-     *  
+     * Check whether this is a simple (leaf) state (UML terminology).
+     *
      * @return true if this is a simple state, otherwise false
      */
     public final boolean isSimple() {
-        return (parallel == null && children.isEmpty()) ? true : false;
+        if (parallel == null && children.isEmpty()) {
+            return true;
+        }
+        return false;
     }
 
-    /** 
-     * Check whether this is a composite state (UML terminology) 
+    /**
+     * Check whether this is a composite state (UML terminology).
      *
      * @return true if this is a composite state, otherwise false
      */
     public final boolean isComposite() {
-        return (parallel == null && children.isEmpty()) ? false : true;
+        if (parallel == null && children.isEmpty()) {
+            return false;
+        }
+        return true;
     }
 
     /**
      * Checks whether it is a region state (directly nested to parallel - UML
-     * terminology)
-     * 
+     * terminology).
+     *
      * @return true if this is a region state, otherwise false
      * @see Parallel
      */
     public final boolean isRegion() {
-        return (getParent() instanceof Parallel) ? true : false;
+        if (getParent() instanceof Parallel) {
+            return true;
+        }
+        return false;
     }
 
     /**
      * Checks whether it is a orthogonal state, that is, it owns a parallel
-     * (UML terminology)
-     * 
+     * (UML terminology).
+     *
      * @return true if this is a orthogonal state, otherwise false
      */
     public final boolean isOrthogonal() {
-        return (parallel != null) ? true : false;
+        if (parallel != null) {
+            return true;
+        }
+        return false;
     }
-    
+
     /**
      * In case this is a parallel state, check if one its final states
      * is active.
-     * 
+     *
      * @return Returns the done.
      */
-    public boolean isDone() {
+    public final boolean isDone() {
         return done;
     }
-    
+
     /**
      * Update the done property, which is set if this is a parallel state,
      * and one its final states is active.
-     * 
+     *
      * @param done The done to set.
      */
-    public void setDone(boolean done) {
+    public final void setDone(final boolean done) {
         this.done = done;
     }
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Transition.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Transition.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Transition.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Transition.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -23,13 +23,13 @@
 
 /**
  * The class in this SCXML object model that corresponds to the
- * &lt;transition&gt; SCXML element. Transition rules are triggered 
- * by &quot;events&quot; and conditionalized via 
+ * &lt;transition&gt; SCXML element. Transition rules are triggered
+ * by &quot;events&quot; and conditionalized via
  * &quot;guard-conditions&quot;.
- * 
+ *
  */
 public class Transition extends Executable implements Observable {
-    
+
     /**
      * Property that specifies the trigger for this transition.
      */
@@ -41,16 +41,16 @@
     private String cond;
 
     /**
-     * Optional property that specifies the new state or parallel 
+     * Optional property that specifies the new state or parallel
      * element to transition to. May be specified by reference or in-line.
      */
     private TransitionTarget target;
 
     /**
-     * The transition target ID (used by XML Digester only)
+     * The transition target ID (used by XML Digester only).
      */
     private String next;
-    
+
     /**
      * The notification registry.
      */
@@ -59,157 +59,162 @@
     /**
      * The path for this transition.
      * @see Path
-     */    
+     */
     private Path path = null;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Transition() {
         super();
     }
 
     /**
-     * Register a listener to this document root
-     * 
+     * Register a listener to this document root.
+     *
      * @param lst The SCXMLListener to add
      */
-    public void addListener(SCXMLListener lst) {
+    public final void addListener(final SCXMLListener lst) {
         notifReg.addListener(this, lst);
     }
 
     /**
-     * Deregister a listener from this document root
-     * 
+     * Deregister a listener from this document root.
+     *
      * @param lst The SCXMLListener to remove
      */
-    public void removeListener(SCXMLListener lst) {
+    public final void removeListener(final SCXMLListener lst) {
         notifReg.removeListener(this, lst);
     }
 
     /**
-     * Get the guard condition (may be null)
-     * 
+     * Get the guard condition (may be null).
+     *
      * @return Returns the cond.
      */
-    public String getCond() {
+    public final String getCond() {
         return cond;
     }
-    
+
     /**
-     * Set the guard condition
-     * 
+     * Set the guard condition.
+     *
      * @param cond The cond to set.
      */
-    public void setCond(String cond) {
+    public final void setCond(final String cond) {
         this.cond = cond;
     }
-    
+
     /**
-     * Get the event that will trigger this transition (pending 
-     * evaluation of the guard condition in favor)
-     * 
+     * Get the event that will trigger this transition (pending
+     * evaluation of the guard condition in favor).
+     *
      * @return Returns the event.
      */
-    public String getEvent() {
+    public final String getEvent() {
         return event;
     }
-    
+
     /**
-     * Set the event that will trigger this transition (pending 
-     * evaluation of the guard condition in favor)
-     * 
+     * Set the event that will trigger this transition (pending
+     * evaluation of the guard condition in favor).
+     *
      * @param event The event to set.
      */
-    public void setEvent(String event) {
+    public final void setEvent(final String event) {
         this.event = event;
     }
-    
+
     /**
-     * Get the transition target (may be null)
-     * 
+     * Get the transition target (may be null).
+     *
      * @return Returns the target as specified in SCXML markup.
      * <p>Remarks: Is <code>null</code> for &quot;stay&quot; transitions.
      *  Returns parent (the source node) for &quot;self&quot; transitions.</p>
      */
-    public TransitionTarget getTarget() {
+    public final TransitionTarget getTarget() {
         return target;
     }
-    
+
     /**
      * Get the runtime transition target, which always resolves to
      * a TransitionTarget instance.
-     * 
+     *
      * @return Returns the actual target of a transition at runtime.
-     * <p>Remarks: For both the &quot;stay&quot; and &quot;self&quot; 
-     * transitions it returns parent (the source node). This method should 
+     * <p>Remarks: For both the &quot;stay&quot; and &quot;self&quot;
+     * transitions it returns parent (the source node). This method should
      * never return <code>null</code>.</p>
      */
-    public TransitionTarget getRuntimeTarget() {
-        return (target != null) ? target : parent;
+    public final TransitionTarget getRuntimeTarget() {
+        if (target != null) {
+            return target;
+        }
+        return getParent();
     }
 
-    
+
     /**
-     * Set the transition target
-     * 
+     * Set the transition target.
+     *
      * @param target The target to set.
      */
-    public void setTarget(TransitionTarget target) {
+    public final void setTarget(final TransitionTarget target) {
         this.target = target;
     }
-    
+
     /**
      * Get the ID of the transition target (may be null, if, for example,
-     * the target is specified inline)
-     * 
-     * @return Returns the transition target ID (used by SCXML Digester only).
+     * the target is specified inline).
+     *
+     * @return String Returns the transition target ID
+     *                (used by SCXML Digester only).
      * @see #getTarget()
      */
-    public String getNext() {
+    public final String getNext() {
         return next;
     }
-    
+
     /**
-     * Set the transition target by specifying its ID
-     * 
+     * Set the transition target by specifying its ID.
+     *
      * @param next The the transition target ID (used by SCXML Digester only).
      * @see #setTarget(TransitionTarget)
      */
-    public void setNext(String next) {
+    public final void setNext(final String next) {
         this.next = next;
     }
-    
+
     /**
      * Supply this Transition object a handle to the notification
      * registry. Called by the Digester after instantiation.
-     * 
+     *
      * @param reg The notification registry
      */
-    public void setNotificationRegistry(NotificationRegistry reg) {
+    public final void setNotificationRegistry(final NotificationRegistry reg) {
         notifReg = reg;
     }
-    
+
     /**
      * Get the notification registry.
-     * 
-     * @return The notification registry.
+     *
+     * @return NotificationRegistry The notification registry.
      */
-    public NotificationRegistry getNotificationRegistry() {
+    public final NotificationRegistry getNotificationRegistry() {
         return notifReg;
     }
 
     /**
      * Get the path of this transiton.
-     * 
+     *
      * @see Path
-     * @return returns the transition path
+     * @return Path returns the transition path
      */
-    public Path getPath() {
-        if(path == null) {
+    public final Path getPath() {
+        if (path == null) {
             path = new Path(getParent(), getTarget());
         }
         return path;
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/TransitionTarget.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/TransitionTarget.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/TransitionTarget.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/TransitionTarget.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -24,10 +24,10 @@
 /**
  * An abstract base class for elements in SCXML that can serve as a
  * &lt;target&gt; for a &lt;transition&gt;, such as State or Parallel.
- * 
+ *
  */
 public abstract class TransitionTarget implements Observable {
-    
+
     /**
      * Identifier for this transition target. Other parts of the SCXML
      * document may refer to this &lt;state&gt; using this ID.
@@ -48,17 +48,17 @@
 
     /**
      * The parent of this transition target (may be null, if the parent
-     * is the SCXML document root)
+     * is the SCXML document root).
      */
     private TransitionTarget parent;
-    
+
     /**
-     * The notification registry
+     * The notification registry.
      */
     private NotificationRegistry notifReg;
 
     /**
-     * Constructor
+     * Constructor.
      */
     public TransitionTarget() {
         super();
@@ -69,121 +69,121 @@
     }
 
     /**
-     * Register a listener to this document root
-     * 
+     * Register a listener to this document root.
+     *
      * @param lst The SCXMLListener to add
      */
-    public void addListener(SCXMLListener lst) {
+    public final void addListener(final SCXMLListener lst) {
         notifReg.addListener(this, lst);
     }
 
     /**
-     * Deregister a listener from this document root
-     * 
+     * Deregister a listener from this document root.
+     *
      * @param lst The SCXMLListener to remove
      */
-    public void removeListener(SCXMLListener lst) {
+    public final void removeListener(final SCXMLListener lst) {
         notifReg.removeListener(this, lst);
     }
 
     /**
      * Supply this TransitionTarget object a handle to the notification
      * registry. Called by the Digester after instantiation.
-     * 
+     *
      * @param reg The notification registry
      */
-    public void setNotificationRegistry(NotificationRegistry reg) {
+    public final void setNotificationRegistry(final NotificationRegistry reg) {
         notifReg = reg;
     }
-    
+
     /**
      * Get the notification registry.
-     * 
+     *
      * @return The notification registry.
      */
-    public NotificationRegistry getNotificationRegistry() {
+    public final NotificationRegistry getNotificationRegistry() {
         return notifReg;
     }
-    
+
     /**
      * Get the identifier for this transition target (may be null).
-     * 
+     *
      * @return Returns the id.
      */
-    public String getId() {
+    public final String getId() {
         return id;
     }
-    
+
     /**
-     * Set the identifier for this transition target
-     * 
+     * Set the identifier for this transition target.
+     *
      * @param id The id to set.
      */
-    public void setId(String id) {
+    public final void setId(final String id) {
         this.id = id;
     }
-    
+
     /**
      * Get the onentry property.
-     * 
+     *
      * @return Returns the onEntry.
      */
-    public OnEntry getOnEntry() {
+    public final OnEntry getOnEntry() {
         return onEntry;
     }
-    
+
     /**
      * Set the onentry property.
-     * 
+     *
      * @param onEntry The onEntry to set.
      */
-    public void setOnEntry(OnEntry onentry) {
-        this.onEntry = onentry;
+    public final void setOnEntry(final OnEntry onEntry) {
+        this.onEntry = onEntry;
     }
-    
+
     /**
      * Get the onexit property.
-     * 
+     *
      * @return Returns the onExit.
      */
-    public OnExit getOnExit() {
+    public final OnExit getOnExit() {
         return onExit;
     }
-    
+
     /**
      * Set the onexit property.
-     * 
+     *
      * @param onExit The onExit to set.
      */
-    public void setOnExit(OnExit onexit) {
-        this.onExit = onexit;
+    public final void setOnExit(final OnExit onExit) {
+        this.onExit = onExit;
     }
-    
+
     /**
-     * Get the parent TransitionTarget
-     * 
-     * @return Returns the parent state 
+     * Get the parent TransitionTarget.
+     *
+     * @return Returns the parent state
      * (null if parent is &lt;scxml&gt; element)
      */
-    public TransitionTarget getParent() {
+    public final TransitionTarget getParent() {
         return parent;
     }
-    
+
     /**
-     * Set the parent TransitionTarget
-     * 
+     * Set the parent TransitionTarget.
+     *
      * @param parent The parent state to set
      */
-    public void setParent(TransitionTarget parent) {
+    public final void setParent(final TransitionTarget parent) {
         this.parent = parent;
     }
 
     /**
-     * Get the parent State
-     * 
+     * Get the parent State.
+     *
      * @return The parent State
      */
-    public State getParentState() {
+    public final State getParentState() {
         TransitionTarget tt = this.getParent();
         if (tt == null) {
             return null;
@@ -195,5 +195,6 @@
             }
         }
     }
-    
+
 }
+

Modified: jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Var.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Var.java?rev=234141&r1=234140&r2=234141&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Var.java (original)
+++ jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/model/Var.java Sat Aug 20 20:24:20 2005
@@ -1,6 +1,6 @@
 /*
- *    
- *   Copyright 2004 The Apache Software Foundation.
+ *
+ *   Copyright 2005 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -20,63 +20,64 @@
 /**
  * The class in this SCXML object model that corresponds to the
  * &lt;var&gt; SCXML element.
- * 
+ *
  */
 public class Var extends Action {
-    
+
     /**
-     * The name of the variable to be created
+     * The name of the variable to be created.
      */
     private String name;
 
     /**
-     * The expression that evaluates to the initial value of the variable
+     * The expression that evaluates to the initial value of the variable.
      */
     private String expr;
-    
+
     /**
-     * Constructor
+     * Constructor.
      */
     public Var() {
         super();
     }
-    
+
     /**
-     * Get the expression that evaluates to the initial value 
-     * of the variable
-     * 
-     * @return Returns the expr.
+     * Get the expression that evaluates to the initial value
+     * of the variable.
+     *
+     * @return String Returns the expr.
      */
-    public String getExpr() {
+    public final String getExpr() {
         return expr;
     }
-    
+
     /**
-     * Set the expression that evaluates to the initial value 
-     * of the variable
-     * 
+     * Set the expression that evaluates to the initial value
+     * of the variable.
+     *
      * @param expr The expr to set.
      */
-    public void setExpr(String expr) {
+    public final void setExpr(final String expr) {
         this.expr = expr;
     }
-    
+
     /**
      * Get the name of the (new) variable.
-     * 
-     * @return Returns the name.
+     *
+     * @return String Returns the name.
      */
-    public String getName() {
+    public final String getName() {
         return name;
     }
-    
+
     /**
      * Set the name of the (new) variable.
-     * 
+     *
      * @param name The name to set.
      */
-    public void setName(String name) {
+    public final void setName(final String name) {
         this.name = name;
     }
-    
+
 }
+



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org