public interface Locator
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String name)
Returns a reference to the object with the given name.
|
java.lang.String |
getLocatorName()
Returns the name of the Locator, for registration, logging, and other
uses.
|
java.lang.String[] |
getNames()
Returns the list of names of references available through this Locator.
|
void |
register(java.lang.String name,
java.lang.Class clazz)
Registers a class related to a name.
|
void |
register(java.lang.String name,
LocatorObjectFactory factory)
Registers an object factory related to a name.
|
void |
register(java.lang.String name,
java.lang.String description,
java.lang.Class clazz)
Registers a class related to a name.
|
void |
register(java.lang.String name,
java.lang.String description,
LocatorObjectFactory factory)
Registers an object factory related to a name.
|
void |
registerDefault(java.lang.String name,
java.lang.Class clazz) |
void |
registerDefault(java.lang.String name,
java.lang.String description,
java.lang.Class clazz) |
java.lang.Object get(java.lang.String name) throws LocatorException
name
- of the object to returnLocatorException
- if there is no access to the class or the class cannot be
instantiatedjava.lang.String[] getNames()
void register(java.lang.String name, java.lang.Class clazz)
get(String)
method.name
- of the object to registerclazz
- the Class of the object to registervoid registerDefault(java.lang.String name, java.lang.Class clazz)
void register(java.lang.String name, java.lang.String description, java.lang.Class clazz)
get(String)
method.name
- of the object to registerdescription
- of the object to registerclazz
- the Class of the object to registervoid registerDefault(java.lang.String name, java.lang.String description, java.lang.Class clazz)
void register(java.lang.String name, LocatorObjectFactory factory)
get(String)
method.name
- of the object to registerfactory
- the factory of objects to registervoid register(java.lang.String name, java.lang.String description, LocatorObjectFactory factory)
get(String)
method.name
- of the object to registerdescription
- of the object to registerfactory
- the factory of objects to registerjava.lang.String getLocatorName()