MentaContainer

Rev

Rev 57 | Rev 70 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57 Rev 58
Line 118... Line 118...
118
         * @return The container itself. (Fluent API)
118
         * @return The container itself. (Fluent API)
119
         */
119
         */
120
        public Container populate(Object bean);
120
        public Container populate(Object bean);
121
       
121
       
122
        /**
122
        /**
123
         * Check whether the container is configured to provide a bean with name 'key'.
-
 
-
 
123
         * Check whether the container currently has a value for this key. For example,
-
 
124
         * if it is a singleton AND someone has requested it, the container will have it cached.
-
 
125
         * The method is useful to check for an instance without forcing her creation.
124
         *
126
         *
125
         * @param key The key representing the bean inside the container.
127
         * @param key The key representing the bean inside the container.
126
         * @return true if the container contains this bean.
-
 
-
 
128
         * @return true if the container has an instance cached in the scope for this key
127
         */
129
         */
128
        public boolean contains(String key);
-
 
-
 
130
        public boolean check(String key);
129
       
131
       
130
        /**
132
        /**
131
         * Clear all cached instances for that scope. If you have a thread pool for example you will
133
         * Clear all cached instances for that scope. If you have a thread pool for example you will
132
         * have to clear the THREAD scope when your thread is returned to the pool.
134
         * have to clear the THREAD scope when your thread is returned to the pool.
133
         *
135
         *
134
         * @param scope The scope to be cleared.
136
         * @param scope The scope to be cleared.
135
         */
137
         */
136
        public void clear(Scope scope);
138
        public void clear(Scope scope);
-
 
139
       
-
 
140
        /**
-
 
141
         * Clear a single key from cache and return the instance that was cached.
-
 
142
         *
-
 
143
         * @param key The key representing the bean inside the container.
-
 
144
         * @return The value that was cached and it is not anymore (was cleared)
-
 
145
         */
-
 
146
        public <T> T clear(String key);
137
}
147
}