MentaContainer

Rev

Rev 146 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 146 Rev 148
Line 36... Line 36...
36
         * Get the type of the instances returned by the associated factory.
36
         * Get the type of the instances returned by the associated factory.
37
         *
37
         *
38
         * @param key The factory
38
         * @param key The factory
39
         * @return The type returned by this factory
39
         * @return The type returned by this factory
40
         */
40
         */
41
        public Class<? extends Object> getType(Object key);
-
 
-
 
41
        public Class<?> getType(Object key);
42
       
42
       
43
        /**
43
        /**
44
         * Configure a bean to be returned with the given implementation when {@link #get(String)} is called.
44
         * Configure a bean to be returned with the given implementation when {@link #get(String)} is called.
45
         * An internal factory will be used.
45
         * An internal factory will be used.
46
         *
46
         *
Line 48... Line 48...
48
         * @param klass The class used to instantiate the bean, in other words, its implementation.
48
         * @param klass The class used to instantiate the bean, in other words, its implementation.
49
         * @param scope The scope of the factory.
49
         * @param scope The scope of the factory.
50
         * @return The factory created as a ConfigurableFactory. (Fluent API)
50
         * @return The factory created as a ConfigurableFactory. (Fluent API)
51
         * @see Scope
51
         * @see Scope
52
         */
52
         */
53
        public ConfigurableFactory ioc(Object key, Class<? extends Object> klass, Scope scope);
-
 
-
 
53
        public ConfigurableFactory ioc(Object key, Class<?> klass, Scope scope);
54
       
54
       
55
        /**
55
        /**
56
         * Same as {@link #ioc(String, Class, Scope)} except that it assumes
56
         * Same as {@link #ioc(String, Class, Scope)} except that it assumes
57
         * there is no scope (Scope.NONE).
57
         * there is no scope (Scope.NONE).
58
         *
58
         *
Line 116... Line 116...
116
         * inside the container.
116
         * inside the container.
117
         *
117
         *
118
         * @param klass The class that should be instantiated.
118
         * @param klass The class that should be instantiated.
119
         * @return An instantiated bean.
119
         * @return An instantiated bean.
120
         */
120
         */
121
        public <T> T construct(Class<? extends Object> klass);
-
 
-
 
121
        public <T> T construct(Class<?> klass);
122
       
122
       
123
        /**
123
        /**
124
         * Check whether the container currently has a value for this key. For example,
124
         * Check whether the container currently has a value for this key. For example,
125
         * if it is a singleton AND someone has requested it, the container will have it cached.
125
         * if it is a singleton AND someone has requested it, the container will have it cached.
126
         * The method is useful to check for an instance without forcing her creation.
126
         * The method is useful to check for an instance without forcing her creation.