From: erik Date: Sun, 13 Apr 2008 09:56:53 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.2@603~174 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=6fff3cd6a9bcad13433d0671f6756ea40444caa2;p=utils --- diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassAdapter.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassAdapter.java index 0de8322d..aa12f355 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassAdapter.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassAdapter.java @@ -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 { private ClassConfiguration _classConfig; diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassConfiguration.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassConfiguration.java index 3756bd3b..8a898110 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassConfiguration.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ClassConfiguration.java @@ -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: - * * * @author Erik Brakkee * diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ConstructorConfiguration.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ConstructorConfiguration.java index 2725d033..676a88fb 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ConstructorConfiguration.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ConstructorConfiguration.java @@ -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: + * + */ 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 */ diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/FixedValueProvider.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/FixedValueProvider.java index e36ecfb2..20cff4e4 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/FixedValueProvider.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/FixedValueProvider.java @@ -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; } diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ParameterValues.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ParameterValues.java index 41348190..609f9d25 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ParameterValues.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ParameterValues.java @@ -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; diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/RequiredInterfaceProvider.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/RequiredInterfaceProvider.java index 76d2d3dc..02178eaa 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/RequiredInterfaceProvider.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/RequiredInterfaceProvider.java @@ -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; } diff --git a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ValueProvider.java b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ValueProvider.java index 03eac1e9..cb5a7303 100644 --- a/trunk/system/general/src/main/java/org/wamblee/system/adapters/ValueProvider.java +++ b/trunk/system/general/src/main/java/org/wamblee/system/adapters/ValueProvider.java @@ -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);