MentaContainer

Rev

Rev 91 | Rev 95 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.mentacontainer;

/**
 * An IoC component that knows how to create instances of itself and
 * can be configured by accepting values for its constructor
 * and properties for its setters. It can also be intercepted right
 * after it is created/wired and right before it is destroyed through
 * the Interceptable interface.
 *
 * @author sergio.oliveira.jr@gmail.com
 */

public interface ConfigurableFactory extends Factory {
       
        /**
         * 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 ConfigurableFactory addInitValue(Object value);
       
        public ConfigurableFactory addInitPrimitive(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 ConfigurableFactory addPropertyValue(String name, Object value);
       
        public ConfigurableFactory addInitDependency(String key);
       
        public ConfigurableFactory addPropertyDependency(String property, String key);
}