MentaContainer

Compare Revisions

Ignore whitespace Rev 45 → Rev 44

/trunk/src/main/java/org/mentacontainer/Component.java
1,7 → 1,8
package org.mentacontainer;
 
/**
* An IoC component that knows how to create instances of itself.
* An IoC component that knows how to create instances of itself and accepts init values for its constructor
* and properties to be injected through its setters.
*
* @author sergio.oliveira.jr@gmail.com
*/
15,6 → 16,24
public <T> T getInstance();
/**
* Add a constructor parameter to be used when the bean is instantiated. It can be called more than once to
* use constructors with more than one argument.
*
* @param value A parameter value to be used by a constructor.
* @return The component itself. (Fluent API)
*/
public Component addInitValue(Object value);
/**
* Add a property to be injected through a setter when the component is instantiated.
*
* @param name The property name.
* @param value The property value.
* @return The component itself. (Fluent API)
*/
public Component addProperty(String name, Object value);
/**
* Is this component a singleton component, in other words,
* it always returns the same instance?
*