Copyright 2006-2008 SpringSource (http://springsource.com), All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
||ObjectContainer is a container which uses multiple Config objects to read sources of|
object definitions. When a object is requested from this container, it may optionally
pull the object from a scoped cache. If there is no stored copy of the object, it
uses the scanned definition and its associated ObjectFactory to create an instance. It
can then optionally store it in a scoped cache for future usage (e.g. singleton).
Object definitions are stored in the container in a neutral format, decoupling the
container entirely from the original source location. This means that XML, python code,
and other formats may all contain definitions. By the time they
reach this container, it doesn't matter what their original format was when a object
instance is needed. NOTE: This explicitly means that one object in one source
can refer to another object in another source OF ANY FORMAT as a property.
||Methods defined here:|
- __init__(self, config=None)
- get_object(self, name, ignore_abstract=False)
- This function attempts to find the object in the singleton cache. If not found,
delegates to _create_object in order to hunt for the definition, and request a
object factory to generate one.
Data descriptors defined here:
- dictionary for instance variables (if defined)
- list of weak references to the object (if defined)