+ private Class clazz;
+
+ private ConstructorConfiguration constructorConfig;
+
+ 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.
+ */
+ public ClassConfiguration(Class aClass) {
+ clazz = aClass;
+ constructorConfig = new ConstructorConfiguration(aClass);
+ objectConfig = new ObjectConfiguration(aClass);
+ }
+
+ public ConstructorConfiguration getConstructorConfig() {
+ return constructorConfig;
+ }
+
+ public ObjectConfiguration getObjectConfig() {
+ return objectConfig;
+ }
+
+ /**
+ * Creates the object in the given scope.
+ *
+ * @param aScope
+ * Scope containing required interfaces for this object.
+ *
+ * @return object.
+ */
+ public Object create(Scope aScope) {
+ return constructorConfig.create(aScope);
+ }
+
+ /**
+ * Injects required interfaces through the setters
+ *
+ * @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);
+ }
+
+ public List<ProvidedInterface> getProvidedInterfaces() {
+ List<ProvidedInterface> result = new ArrayList<ProvidedInterface>();
+ result.add(new DefaultProvidedInterface("provided", clazz));
+
+ return result;
+ }