|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Generated(value="org.jomc.tools.SourceFileProcessor 1.2", comments="See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2") public interface ObjectManager
Manages objects.
getObject(ObjectManager.class)
,
getObject(ObjectManager.class, "implementation name")
,
ObjectManagerFactory
Method Summary | ||
---|---|---|
Object |
getDependency(Object object,
String dependencyName)
Gets an instance of a dependency of an object. |
|
String |
getMessage(Object object,
String messageName,
Locale locale,
Object... arguments)
Gets an instance of a message of an object. |
|
|
getObject(Class<T> specification)
Gets an instance of an implementation of a specification. |
|
|
getObject(Class<T> specification,
String implementationName)
Gets an instance of an implementation of a specification. |
|
Object |
getProperty(Object object,
String propertyName)
Gets an instance of a property of an object. |
Method Detail |
---|
<T> T getObject(Class<T> specification) throws NullPointerException, ObjectManagementException
Note:
Implementations must use the class loader associated with the given class as returned by method
specification.getClassLoader()
for loading classes. Only if that method returns
null
, indicating the class has been loaded by the bootstrap class loader, use of the bootstrap class
loader is recommended.
T
- The type of the instance.specification
- The specification class to return an implementation instance of.
specification
or null
, if no
such instance is available.
NullPointerException
- if specification
is null
.
ObjectManagementException
- if getting the object fails.<T> T getObject(Class<T> specification, String implementationName) throws NullPointerException, ObjectManagementException
Note:
Implementations must use the class loader associated with the given class as returned by method
specification.getClassLoader()
for loading classes. Only if that method returns
null
, indicating the class has been loaded by the bootstrap class loader, use of the bootstrap class
loader is recommended.
T
- The type of the instance.specification
- The specification class to return an implementation instance of.implementationName
- The name of the implementation to return an instance of.
implementationName
of the specification class
specification
or null
, if no such instance is available.
NullPointerException
- if specification
or implementationName
is null
.
ObjectManagementException
- if getting the object fails.Object getDependency(Object object, String dependencyName) throws NullPointerException, ObjectManagementException
Note:
Implementations must use the class loader associated with the class of the given object as returned by method
object.getClass().getClassLoader()
for loading classes. Only if that method
returns null
, indicating the class has been loaded by the bootstrap class loader, use of the bootstrap
class loader is recommended.
object
- The object to return a dependency instance of.dependencyName
- The name of the dependency of object
to return an instance of.
dependencyName
of object
or null
, if no such
instance is available.
NullPointerException
- if object
or dependencyName
is null
.
ObjectManagementException
- if getting the dependency instance fails.Object getProperty(Object object, String propertyName) throws NullPointerException, ObjectManagementException
Note:
Implementations must use the class loader associated with the class of the given object as returned by method
object.getClass().getClassLoader()
for loading classes. Only if that method
returns null
, indicating the class has been loaded by the bootstrap class loader, use of the bootstrap
class loader is recommended.
object
- The object to return a property instance of.propertyName
- The name of the property of object
to return an instance of.
propertyName
of object
or null
, if no such
instance is available.
NullPointerException
- if object
or propertyName
is null
.
ObjectManagementException
- if getting the property instance fails.String getMessage(Object object, String messageName, Locale locale, Object... arguments) throws NullPointerException, ObjectManagementException
Note:
Implementations must use the class loader associated with the class of the given object as returned by method
object.getClass().getClassLoader()
for loading classes. Only if that method
returns null
, indicating the class has been loaded by the bootstrap class loader, use of the bootstrap
class loader is recommended.
object
- The object to return a message instance of.messageName
- The name of the message of object
to return an instance of.locale
- The locale of the message instance to return.arguments
- Arguments to format the message instance with.
messageName
of object
formatted with arguments
for locale
or null
, if no such instance is available.
NullPointerException
- if object
, messageName
or locale
is null
.
ObjectManagementException
- if getting the message instance fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2005-2012 The JOMC Project. All Rights Reserved. |