You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/01/09 17:16:15 UTC

svn commit: r897485 - in /myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces: extensions/scripting/loader/ scripting/api/ scripting/core/dependencyScan/ scripting/core/reloading/

Author: werpu
Date: Sat Jan  9 16:16:14 2010
New Revision: 897485

URL: http://svn.apache.org/viewvc?rev=897485&view=rev
Log:
removed a load of warnings and typos

Modified:
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ClassLoaderUtils.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ReloadingClassLoader.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ArtefactType.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/CompilerConst.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Configuration.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicClassIdentifier.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicCompiler.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ReloadingStrategy.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingConst.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Unreloadable.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/ClassDependencies.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/GlobalReloadingStrategy.java

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ClassLoaderUtils.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ClassLoaderUtils.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ClassLoaderUtils.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ClassLoaderUtils.java Sat Jan  9 16:16:14 2010
@@ -25,6 +25,7 @@
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -85,8 +86,8 @@
         StringBuffer classpath = new StringBuffer();
 
         URL[] urls = resolveClasspath(classLoader);
-        for (int i = 0; i < urls.length; ++i) {
-            classpath.append(urls[i].getPath());
+        for (URL url : urls) {
+            classpath.append(url.getPath());
 
             // Note that the classpath separator character is platform
             // dependent. On Windows systems it's ";" whereas on other
@@ -116,9 +117,7 @@
 
                 URL[] urls = urlClassLoader.getURLs();
                 if (urls != null) {
-                    for (int i = 0; i < urls.length; ++i) {
-                        classpath.add(urls[i]);
-                    }
+                    classpath.addAll(Arrays.asList(urls));
                 }
             } else {
                 if (logger.isWarnEnabled()) {
@@ -132,7 +131,7 @@
             classLoader = classLoader.getParent();
         }
 
-        return (URL[]) classpath.toArray(new URL[classpath.size()]);
+        return classpath.toArray(new URL[classpath.size()]);
     }
 
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ReloadingClassLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ReloadingClassLoader.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ReloadingClassLoader.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/extensions/scripting/loader/ReloadingClassLoader.java Sat Jan  9 16:16:14 2010
@@ -259,6 +259,7 @@
      * @param parentClassLoader the parent ClassLoader to use
      * @return a copy of the current reloading class loader
      */
+    @SuppressWarnings("unused")
     public ReloadingClassLoader cloneWithParentClassLoader(ClassLoader parentClassLoader) {
         ReloadingClassLoader classLoader =
                 new ReloadingClassLoader(parentClassLoader, compilationDirectory);

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ArtefactType.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ArtefactType.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ArtefactType.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ArtefactType.java Sat Jan  9 16:16:14 2010
@@ -4,10 +4,11 @@
  * @author Werner Punz (latest modification by $Author$)
  * @version $Revision$ $Date$
  *          <p/>
- *          A set of artefact types which are used internally
+ *          A set of artifact types which are used internally
  *          so that the reloading strategies and other parts of the system
- *          can adapt to the type of the artefact which has to be reloaded
+ *          can adapt to the type of the artifact which has to be reloaded
  */
+@SuppressWarnings("unused")
 public enum ArtefactType {
     MANAGED_BEAN,
     COMPONENT,

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/BaseWeaver.java Sat Jan  9 16:16:14 2010
@@ -79,6 +79,9 @@
 
     /**
      * condition which marks a metadata as reload candidate
+     *
+     * @param reloadMeta the metadata to be investigated for reload candidacy
+     * @return true if it is a reload candidate
      */
     public boolean isReloadCandidate(ReloadingMetadata reloadMeta) {
         return reloadMeta != null && assertScriptingEngine(reloadMeta) && reloadMeta.isTaintedOnce();
@@ -96,9 +99,9 @@
     /**
      * reloads a scripting instance object
      *
-     * @param scriptingInstance     the object which has to be reloaded
-     * @param artifactType          integer value indication which type of JSF artifact we have to deal with
-     * @return                      the reloaded object with all properties transferred or the original object if no reloading was needed
+     * @param scriptingInstance the object which has to be reloaded
+     * @param artifactType      integer value indication which type of JSF artifact we have to deal with
+     * @return the reloaded object with all properties transferred or the original object if no reloading was needed
      */
     public Object reloadScriptingInstance(Object scriptingInstance, int artifactType) {
         Map<String, ReloadingMetadata> classMap = getClassMap();
@@ -232,9 +235,6 @@
 
 
     public void requestRefresh() {
-        //needed?
-
-
         if (WeavingContext.getRefreshContext().isRecompileRecommended(getScriptingEngine())) {
             // we set a lock over the compile and bean refresh
             //and an inner check again to avoid unneeded compile triggers
@@ -289,7 +289,7 @@
             Set<String> managedBeanClasses = new HashSet<String>();
 
             Map<String, ManagedBean> mbeans = RuntimeConfig.getCurrentInstance(FacesContext.getCurrentInstance().getExternalContext()).getManagedBeans();
-            Map<String, ManagedBean> workCopy = null;
+            Map<String, ManagedBean> workCopy;
 
             synchronized (RefreshContext.BEAN_SYNC_MONITOR) {
                 workCopy = makeSnapshot(mbeans);
@@ -330,16 +330,17 @@
     }
 
     /**
-     * myfaces 2.0 keeps an immutable map over the session
+     * MyFaces 2.0 keeps an immutable map over the session
      * and request scoped beans
      * if we alter that during our loop we get a concurrent modification exception
      * taking a snapshot in time fixes that
      *
-     * @param mbeans
-     * @return
+     * @param mbeans the internal managed bean map which has to be investigated
+     * @return a map with the class name as key and the managed bean info
+     *         as value of the current state of the internal runtime config bean map
      */
     private Map<String, ManagedBean> makeSnapshot(Map<String, ManagedBean> mbeans) {
-        Map<String, ManagedBean> workCopy = null;
+        Map<String, ManagedBean> workCopy;
 
         workCopy = new HashMap<String, ManagedBean>(mbeans.size());
         for (Map.Entry<String, ManagedBean> entry : mbeans.entrySet()) {
@@ -379,11 +380,10 @@
             //the bean map from outside we still get race conditions
             //But for most cases this mutex should be enough
 
-            Map<String, ManagedBean> workCopy = null;
+            Map<String, ManagedBean> workCopy;
 
             workCopy = makeSnapshot(mbeans);
 
-
             for (Map.Entry<String, ManagedBean> entry : workCopy.entrySet()) {
 
                 Class managedBeanClass = entry.getValue().getManagedBeanClass();
@@ -417,7 +417,7 @@
      * for jsf2 we probably have some kind of notification mechanism
      * which notifies custom scopes
      *
-     * @param bean
+     * @param bean the managed bean which all references have to be removed from
      */
 
     private void removeBeanReferences(ManagedBean bean) {
@@ -440,7 +440,7 @@
     /**
      * jsf2 helper to remove custom scoped beans
      *
-     * @param bean
+     * @param bean the managed bean which has to be removed from the custom scope from
      */
     private void removeCustomScopedBean(ManagedBean bean) {
         Object scopeImpl = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get(bean.getManagedBeanScope());

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java Sat Jan  9 16:16:14 2010
@@ -15,8 +15,10 @@
 
     public void scanPaths();
 
+    @SuppressWarnings("unused")
     public void clearListeners();
 
+    @SuppressWarnings("unused")
     public void addListener(ClassScanListener listener);
 
     public void addScanPath(String scanPath);

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/CompilerConst.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/CompilerConst.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/CompilerConst.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/CompilerConst.java Sat Jan  9 16:16:14 2010
@@ -34,5 +34,6 @@
     public static final String JC_DEBUG = "-g";
     public static final String JAVA_WILDCARD = "*.java ";
     public static final String JC_VERBOSE = "-verbose";
+    @SuppressWarnings("unused")
     public static final String JC_SOURCE = "-source";
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Configuration.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Configuration.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Configuration.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Configuration.java Sat Jan  9 16:16:14 2010
@@ -29,7 +29,7 @@
      * for systems which can use resource loaders
      * <p/>
      * so that we can load various resources as well
-     * from separate sourcedirs instead
+     * from separate source directories instead
      */
     volatile List<String> _resourceDirs = new CopyOnWriteArrayList<String>();
 
@@ -38,18 +38,20 @@
     }
 
     public void addSourceDir(int scriptingEngine, String sourceDir) {
-        CopyOnWriteArrayList dirs = _sourceDirs.get(scriptingEngine);
+        CopyOnWriteArrayList<String> dirs = _sourceDirs.get(scriptingEngine);
         if (dirs == null) {
-            dirs = new CopyOnWriteArrayList();
+            dirs = new CopyOnWriteArrayList<String>();
             _sourceDirs.put(scriptingEngine, dirs);
         }
         dirs.add(sourceDir);
     }
 
+    @SuppressWarnings("unused")
     public void addCompileTarget(int scriptingEngine, String target) {
         _compileTarget.put(scriptingEngine, target);
     }
 
+    @SuppressWarnings("unused")
     public String getCompileTarget(int scriptingEngine) {
         return _compileTarget.get(scriptingEngine);
     }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicClassIdentifier.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicClassIdentifier.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicClassIdentifier.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicClassIdentifier.java Sat Jan  9 16:16:14 2010
@@ -19,7 +19,7 @@
 package org.apache.myfaces.scripting.api;
 
 /**
- * @author werpu
+ * @author Werner Punz
  *         Generic  class identifier interface
  *         has to be implemented by all identifiers
  */
@@ -28,15 +28,16 @@
      * identifies whether a given class is dynamic or not
      *
      * @param clazz the class which has to be investigates
-     * @return true if it is dynamic false if not
+     * @return true     if it is dynamic false if not
      */
     public boolean isDynamic(Class clazz);
 
     /**
      * gets the engine
      *
-     * @param clazz
-     * @return
+     * @param clazz the class which the engine type has to be determined for
+     * @return the engine type as integer value
      */
+    @SuppressWarnings("unused")
     public int getEngineType(Class clazz);
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicCompiler.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicCompiler.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/DynamicCompiler.java Sat Jan  9 16:16:14 2010
@@ -37,6 +37,7 @@
      * compiles a single file into a class
      *
      * @param sourceRoot the source search path (root of our source)
+     * @param classPath the classpath for the compiler
      * @param filePath   the relative path of our file
      * @return a valid java class of our file
      * @throws ClassNotFoundException in case of the class neither could be found

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ReloadingStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ReloadingStrategy.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ReloadingStrategy.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ReloadingStrategy.java Sat Jan  9 16:16:14 2010
@@ -5,10 +5,10 @@
  * @version $Revision$ $Date$
  *          <p/>
  *          Generic strategy for reloading
- *          this should encapsule various
+ *          this should encapsulate various
  *          reloading strategies
  *          which have to be applied depending
- *          on the artefact
+ *          on the artifact
  */
 public interface ReloadingStrategy {
     public Object reload(Object toReload, int artefactType);

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingConst.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingConst.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingConst.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingConst.java Sat Jan  9 16:16:14 2010
@@ -24,6 +24,7 @@
  *
  * @author Werner Punz
  */
+@SuppressWarnings("unused")
 public class ScriptingConst {
     public static final String SCRIPTING_CLASSLOADER = "org.apache.myfaces.SCRIPTING_CLASSLOADER";
     public static final String SCRIPTING_GROOVFACTORY = "org.apache.myfaces.SCRIPTING_GROOVYFACTORY";
@@ -39,28 +40,28 @@
     public static final int ENGINE_TYPE_NO_ENGINE = -1;
     public static final int ENGINE_TYPE_GROOVY = 0;
     public static final int ENGINE_TYPE_JAVA = 1;
-    public static final int ARTEFACT_TYPE_UNKNOWN = -1;
-    public static final int ARTEFACT_TYPE_MANAGEDBEAN = 1;
-    public static final int ARTEFACT_TYPE_MANAGEDPROPERTY = 2;
-    public static final int ARTEFACT_TYPE_RENDERKIT = 3;
-    public static final int ARTEFACT_TYPE_VIEWHANDLER = 4;
-    public static final int ARTEFACT_TYPE_RENDERER = 5;
-    public static final int ARTEFACT_TYPE_COMPONENT = 6;
-    public static final int ARTEFACT_TYPE_VALIDATOR = 7;
-    public static final int ARTEFACT_TYPE_BEHAVIOR = 8;
-    public static final int ARTEFACT_TYPE_APPLICATION = 9;
-    public static final int ARTEFACT_TYPE_ELCONTEXTLISTENER = 10;
-    public static final int ARTEFACT_TYPE_ACTIONLISTENER = 11;
-    public static final int ARTEFACT_TYPE_VALUECHANGELISTENER = 12;
-    public static final int ARTEFACT_TYPE_CONVERTER = 13;
-    public static final int ARTEFACT_TYPE_LIFECYCLE = 14;
-    public static final int ARTEFACT_TYPE_PHASELISTENER = 15;
-    public static final int ARTEFACT_TYPE_FACESCONTEXT = 16;
-    public static final int ARTEFACT_TYPE_NAVIGATIONHANDLER = 17;
-    public static final int ARTEFACT_TYPE_RESPONSEWRITER = 18;
-    public static final int ARTEFACT_TYPE_RESPONSESTREAM = 19;
-    public static final int ARTEFACT_TYPE_RESOURCEHANDLER = 19;
-    public static final int ARTEFACT_TYPE_CLIENTBEHAVIORRENDERER = 20;
+    public static final int ARTIFACT_TYPE_UNKNOWN = -1;
+    public static final int ARTIFACT_TYPE_MANAGEDBEAN = 1;
+    public static final int ARTIFACT_TYPE_MANAGEDPROPERTY = 2;
+    public static final int ARTIFACT_TYPE_RENDERKIT = 3;
+    public static final int ARTIFACT_TYPE_VIEWHANDLER = 4;
+    public static final int ARTIFACT_TYPE_RENDERER = 5;
+    public static final int ARTIFACT_TYPE_COMPONENT = 6;
+    public static final int ARTIFACT_TYPE_VALIDATOR = 7;
+    public static final int ARTIFACT_TYPE_BEHAVIOR = 8;
+    public static final int ARTIFACT_TYPE_APPLICATION = 9;
+    public static final int ARTIFACT_TYPE_ELCONTEXTLISTENER = 10;
+    public static final int ARTIFACT_TYPE_ACTIONLISTENER = 11;
+    public static final int ARTIFACT_TYPE_VALUECHANGELISTENER = 12;
+    public static final int ARTIFACT_TYPE_CONVERTER = 13;
+    public static final int ARTIFACT_TYPE_LIFECYCLE = 14;
+    public static final int ARTIFACT_TYPE_PHASELISTENER = 15;
+    public static final int ARTIFACT_TYPE_FACESCONTEXT = 16;
+    public static final int ARTIFACT_TYPE_NAVIGATIONHANDLER = 17;
+    public static final int ARTIFACT_TYPE_RESPONSEWRITER = 18;
+    public static final int ARTIFACT_TYPE_RESPONSESTREAM = 19;
+    public static final int ARTIFACT_TYPE_RESOURCEHANDLER = 19;
+    public static final int ARTIFACT_TYPE_CLIENTBEHAVIORRENDERER = 20;
 
     public static final String CTX_REQUEST_CNT = "RequestCnt";
     public static final String CTX_CONFIGURATION = "ExtScriptingConfig";

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java Sat Jan  9 16:16:14 2010
@@ -22,34 +22,34 @@
 
 /**
  * @author werpu
- * @date: 15.08.2009
- * <p/>
- * Central interface to the scripting layer
- * this class is a weaver which allows to trigger
- * the scripting layer in various situations
- * of the JSF interception points
- * <p/>
- * The scripting weaver replaces the classloader for those instances
- * because custom classloaders are inherently problematic in web containers
+ *         <p/>
+ *         <p/>
+ *         Central interface to the scripting layer
+ *         this class is a weaver which allows to trigger
+ *         the scripting layer in various situations
+ *         of the JSF interception points
+ *         <p/>
+ *         The scripting weaver replaces the classloader for those instances
+ *         because custom classloaders are inherently problematic in web containers
  */
 public interface ScriptingWeaver {
 
     /**
      * appends a custom script search path to the original one
      *
-     * @param scriptPaths
-     * @deprecates
+     * @param scriptPath a script path to be appended
+     * @deprecated
      */
-    public void appendCustomScriptPath(String scriptPaths);
+    public void appendCustomScriptPath(String scriptPath);
 
 
     /**
      * @param o            the object which has to be reloaded
-     * @param artefactType an identifier for the artefact type so that its reloading strategies can
-     *                     be adjusted depending on the type of artefact which has to be processed, we have to pass down
-     *                     this artefact because we cannot rely on instanceof here for several reasons first we do not know
-     *                     if a managed bean does not implement as well one of the artefact interfaces for one reason or the other
-     *                     secondly how do we deal with future extensions which provide new artefacts we cannot
+     * @param artifactType an identifier for the artifact type so that its reloading strategies can
+     *                     be adjusted depending on the type of artifact which has to be processed, we have to pass down
+     *                     this artifact because we cannot rely on instanceof here for several reasons first we do not know
+     *                     if a managed bean does not implement as well one of the artifact interfaces for one reason or the other
+     *                     secondly how do we deal with future extensions which provide new artifacts we cannot
      *                     bind the code to just one implementation, hence we add some kind of type identifier here as well
      * @return reloads an existing objects with its attributes
      *         and assigns the reloaded class to the new object
@@ -57,7 +57,7 @@
      *         note, the new object must not be the same as the original one
      *         it can be a shallow clone with a new class instead
      */
-    public Object reloadScriptingInstance(Object o, int artefactType);
+    public Object reloadScriptingInstance(Object o, int artifactType);
 
     /**
      * reloads an existing class if needed
@@ -78,25 +78,26 @@
      */
     public Class loadScriptingClassFromName(String className);
 
-
     /**
      * returns the engine type for this weaver
      *
-     * @return
+     * @return the supported scripting engine of this weaver
      */
     public int getScriptingEngine();
 
-
     /**
-     * checks wether a given class can be reloaded
+     * checks whether a given class can be reloaded
      * from this weaver or not
      *
-     * @param clazz
-     * @return
+     * @param clazz the class which has to be investigated
+     * @return true if the class is dynamic false otherwise
      */
     public boolean isDynamic(Class clazz);
 
-
+    /**
+     * @param weaverClass the weaver class
+     * @return an instance of the weaver class (mostly singleton)
+     */
     public ScriptingWeaver getWeaverInstance(Class weaverClass);
 
     /**
@@ -105,22 +106,19 @@
      */
     public void fullClassScan();
 
-
     /**
      * do a full recompile of changed resources instead of a
      * simply compile per file
      */
     public void fullRecompile();
 
-
     /**
-     * callback for artefacting request refreshes
-     * some artefacts should be refreshed or cleared upon
+     * callback for artifact request refreshes
+     * some artifacts should be refreshed or cleared upon
      * request time, others can be dealt with on on demand time
      */
     public void requestRefresh();
 
-
     /**
      * loads a list of possible dynamic classes
      * for the current given state of the source dirs

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Unreloadable.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Unreloadable.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Unreloadable.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/Unreloadable.java Sat Jan  9 16:16:14 2010
@@ -14,5 +14,6 @@
  *          scopes if possible to enforce a clean reload wherever possible.
  *          </p>
  */
+@SuppressWarnings("unused")
 public interface Unreloadable {
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/ClassDependencies.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/ClassDependencies.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/ClassDependencies.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/dependencyScan/ClassDependencies.java Sat Jan  9 16:16:14 2010
@@ -16,7 +16,7 @@
      * classname
      * <p/>
      * <p/>
-     * the key is a depenency a class has the value is a set of classes which depend on the current class
+     * the key is a dependency a class has the value is a set of classes which depend on the current class
      */
     private Map<String, Set<String>> reverseIndex = new ConcurrentHashMap<String, Set<String>>();
 
@@ -29,8 +29,8 @@
      * adds a set of dependencies to the
      * reverse lookup index
      *
-     * @param referencingClass
-     * @param referencedClasses
+     * @param referencingClass  the referencing class of this dependency
+     * @param referencedClasses the referenced class of this dependency
      */
     public void addDependencies(String referencingClass, Collection<String> referencedClasses) {
         for (String referencedClass : referencedClasses) {
@@ -73,7 +73,7 @@
         return reverseIndex.get(referencedClass);
     }
 
-    private final Set<String> getReverseDependencies(String dependency) {
+    private Set<String> getReverseDependencies(String dependency) {
         Set<String> dependencies = reverseIndex.get(dependency);
         if (dependencies == null) {
             dependencies = Collections.synchronizedSet(new HashSet<String>());

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/GlobalReloadingStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/GlobalReloadingStrategy.java?rev=897485&r1=897484&r2=897485&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/GlobalReloadingStrategy.java (original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/reloading/GlobalReloadingStrategy.java Sat Jan  9 16:16:14 2010
@@ -60,17 +60,17 @@
     public Object reload(Object toReload, int artefactType) {
 
         switch (artefactType) {
-            case ScriptingConst.ARTEFACT_TYPE_MANAGEDBEAN:
+            case ScriptingConst.ARTIFACT_TYPE_MANAGEDBEAN:
                 return _beanStrategy.reload(toReload, artefactType);
-            case ScriptingConst.ARTEFACT_TYPE_RENDERER:
+            case ScriptingConst.ARTIFACT_TYPE_RENDERER:
                 return _noMappingStrategy.reload(toReload, artefactType);
-            case ScriptingConst.ARTEFACT_TYPE_BEHAVIOR:
+            case ScriptingConst.ARTIFACT_TYPE_BEHAVIOR:
                 return _noMappingStrategy.reload(toReload, artefactType);
-            case ScriptingConst.ARTEFACT_TYPE_CLIENTBEHAVIORRENDERER:
+            case ScriptingConst.ARTIFACT_TYPE_CLIENTBEHAVIORRENDERER:
                 return _noMappingStrategy.reload(toReload, artefactType);
-            case ScriptingConst.ARTEFACT_TYPE_COMPONENT:
+            case ScriptingConst.ARTIFACT_TYPE_COMPONENT:
                 return _noMappingStrategy.reload(toReload, artefactType);
-            case ScriptingConst.ARTEFACT_TYPE_VALIDATOR:
+            case ScriptingConst.ARTIFACT_TYPE_VALIDATOR:
                 return _noMappingStrategy.reload(toReload, artefactType);
             //TODO Add other artefact loading strategies on demand here
             default: