import java.util.ArrayList;
import java.util.List;
-
/**
- * The class configuration encapsulates the knowledge of how to wrap a
- * class as a component.
- *
+ * The class configuration encapsulates the knowledge of how to wrap a class as
+ * a component.
+ *
* @author Erik Brakkee
*/
public class ClassConfiguration {
- /**
- * DOCUMENT ME!
- */
private Class _class;
- /**
- * DOCUMENT ME!
- */
private ConstructorConfiguration constructorConfig;
- /**
- * DOCUMENT ME!
- */
private ObjectConfiguration objectConfig;
-/**
- * Constructs the configuration. By default no constructor is selected and
- * one of {@link #select(Class...)} or
- * {@link #greedy()} must be called.
- * @param aClass Class to construct.
- */
+ /**
+ * Constructs the configuration. By default no constructor is selected and
+ * one of {@link #select(Class...)} or {@link #greedy()} must be called.
+ *
+ * @param aClass
+ * Class to construct.
+ */
public ClassConfiguration(Class aClass) {
- _class = aClass;
- constructorConfig = new ConstructorConfiguration(aClass);
- objectConfig = new ObjectConfiguration(aClass);
+ _class = aClass;
+ constructorConfig = new ConstructorConfiguration(aClass);
+ objectConfig = new ObjectConfiguration(aClass);
}
- /**
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
public ConstructorConfiguration getConstructorConfig() {
return constructorConfig;
}
- /**
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
public ObjectConfiguration getObjectConfig() {
return objectConfig;
}
/**
* Creates the object in the given scope.
- *
- * @param aScope Scope containing required interfaces for this object.
- *
+ *
+ * @param aScope
+ * Scope containing required interfaces for this object.
+ *
* @return object.
*/
public Object create(Scope aScope) {
/**
* Injects required interfaces through the setters
- *
- * @param aScope Scope in which injection takes place.
- * @param aObject Object to inject into.
+ *
+ * @param aScope
+ * Scope in which injection takes place.
+ * @param aObject
+ * Object to inject into.
*/
public void inject(Scope aScope, Object aObject) {
objectConfig.inject(aScope, aObject);
}
- /**
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
public List<ProvidedInterface> getProvidedInterfaces() {
List<ProvidedInterface> result = new ArrayList<ProvidedInterface>();
result.add(new DefaultProvidedInterface("provided", _class));
return result;
}
- /**
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
public List<RequiredInterface> getRequiredInterfaces() {
List<RequiredInterface> result = new ArrayList<RequiredInterface>();
result.addAll(constructorConfig.getRequiredInterfaces());