(no commit message)
authorErik Brakkee <erik@brakkee.org>
Sun, 13 Apr 2008 09:56:53 +0000 (09:56 +0000)
committerErik Brakkee <erik@brakkee.org>
Sun, 13 Apr 2008 09:56:53 +0000 (09:56 +0000)
system/general/src/main/java/org/wamblee/system/adapters/ClassAdapter.java
system/general/src/main/java/org/wamblee/system/adapters/ClassConfiguration.java
system/general/src/main/java/org/wamblee/system/adapters/ConstructorConfiguration.java
system/general/src/main/java/org/wamblee/system/adapters/FixedValueProvider.java
system/general/src/main/java/org/wamblee/system/adapters/ParameterValues.java
system/general/src/main/java/org/wamblee/system/adapters/RequiredInterfaceProvider.java
system/general/src/main/java/org/wamblee/system/adapters/ValueProvider.java

index 0de8322de0c6b952123d9c95e69dac4bfb5f9021..aa12f35599e450bc2ab34781df55a15e57eb942f 100644 (file)
@@ -21,6 +21,11 @@ import org.wamblee.system.core.ProvidedInterface;
 import org.wamblee.system.core.RequiredInterface;
 import org.wamblee.system.core.Scope;
 
+/**
+ * A Class Adapter adapts a given class to a Component.
+ *  
+ * @author Erik Brakkee
+ */
 public class ClassAdapter extends AbstractComponent<Object> {
 
        private ClassConfiguration _classConfig;
index 3756bd3b7923fa52c00af73b3ebcfc97c0f27f94..8a898110acbf79b83d1890774a8f5d3e44ac6b45 100644 (file)
@@ -31,18 +31,6 @@ import org.wamblee.system.core.SystemAssemblyException;
 
 /**
  * The class configuration encapsulates the knowledge of how to wrap a class as a component.
- * In particular, it provides:
- * <ul>
- *   <li> Selection of a constructor using explicit selection 
- *      {@link #select(Class...)} or using the most greedy constructor 
- *      {@link #greedy()}.
- *   </li>
- *   <li>
- *      Selection of methods to invoke to inject other objects into the object.  
- *   </li>
- *   <li> Selection of fields to set. 
- *   </li>
- * </ul>
  * 
  * @author Erik Brakkee
  *
index 2725d0338fcae9026cf8f02754da8c2e5453f6f8..676a88fba9a9fe927d2309007abad2ed398be422 100644 (file)
@@ -28,6 +28,22 @@ import org.wamblee.system.core.RequiredInterface;
 import org.wamblee.system.core.Scope;
 import org.wamblee.system.core.SystemAssemblyException;
 
+/**
+ * Class that allows configuration of the constructor to use. 
+ * 
+ * In particular, it provides:
+ * <ul>
+ *   <li> Selection of a constructor using explicit selection 
+ *      {@link #select(Class...)} or using the most greedy constructor 
+ *      {@link #greedy()}.
+ *   </li>
+ *   <li>
+ *      Selection of methods to invoke to inject other objects into the object.  
+ *   </li>
+ *   <li> Selection of fields to set. 
+ *   </li>
+ * </ul>
+ */
 public class ConstructorConfiguration {
        private Class _class; 
        private Constructor<?> _constructor;
@@ -35,9 +51,8 @@ public class ConstructorConfiguration {
        private boolean _publicOnly; 
 
        /**
-        * Constructs the configuration. By default no constructor is selected and 
-        * one of {@link #select(Class...)} or 
-        * {@link #greedy()} must be called.  
+        * Constructs the configuration. By default the public constructor with the 
+        * most arguments will be used.   
         * @param aClass Class to construct. 
         */
        public ConstructorConfiguration(Class aClass) {
@@ -48,7 +63,7 @@ public class ConstructorConfiguration {
        
        /**
         * Sets whether or no non public constructors are also considered.
-        * Reset the choice of a constructor. 
+        * Reset the choice of a constructor to its default.  
         * @param aNonPublic
         * @return
         */
index e36ecfb2ed4d373ab0fc7ff0592a7944a13a3b89..20cff4e441ae83892c988531f9827949bbc8332d 100644 (file)
@@ -17,10 +17,19 @@ package org.wamblee.system.adapters;
 
 import org.wamblee.system.core.Scope;
 
+/**
+ * Value provider that provides a fixed value.
+ *  
+ * @author Erik Brakkee
+ */
 public class FixedValueProvider implements ValueProvider {
        
        private Object _value;
        
+       /**
+        * Constructs the value. 
+        * @param aValue Value to construct. 
+        */
        public FixedValueProvider(Object aValue) { 
                _value = aValue; 
        }
index 413481907a92dce77853cc40caa5bb9b75ed7164..609f9d2586dbbce17b143aad3254e3ab384fdfea 100644 (file)
@@ -22,6 +22,12 @@ import org.wamblee.system.core.DefaultRequiredInterface;
 import org.wamblee.system.core.RequiredInterface;
 import org.wamblee.system.core.Scope;
 
+/**
+ * Represents parameter values for a method or constructor and allows for the configuration
+ * of how these values are retrieved. 
+ * 
+ * @author Erik Brakkee
+ */
 public class ParameterValues {
        private Class[] _types;
        private ValueProvider[] _values;
index 76d2d3dc83f5c2606d4807453a13998ddc99156c..02178eaa5c3a48f204a217f2e456c62b22d2db79 100644 (file)
@@ -18,10 +18,19 @@ package org.wamblee.system.adapters;
 import org.wamblee.system.core.RequiredInterface;
 import org.wamblee.system.core.Scope;
 
+/**
+ * Value provider that provides a value through a required interface.
+ *  
+ * @author Erik Brakkee
+ */
 public class RequiredInterfaceProvider implements ValueProvider {
        
        private RequiredInterface _required; 
        
+       /**
+        * Constructs the provider 
+        * @param aRequired Required interface. 
+        */
        public RequiredInterfaceProvider(RequiredInterface aRequired) { 
                _required = aRequired; 
        }
index 03eac1e9df351477ee04df711158f2e1a278bef3..cb5a73039971788d12fa46bf1153e6186bb3f1c5 100644 (file)
@@ -17,6 +17,11 @@ package org.wamblee.system.adapters;
 
 import org.wamblee.system.core.Scope;
 
+/**
+ * Interface used to provide values for arguments of methods and constructors. 
+ * 
+ * @author Erik Brakkee
+ */
 public interface ValueProvider {
 
        Object getValue(Scope aScope);