public abstract class AbstractLocator extends Object implements Locator, Locator_withExists
Constructor and Description |
---|
AbstractLocator() |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String name)
Returns true if exists a manager registered for this name.
|
Object |
get(String name)
Returns a reference to the object with the given name.
|
String[] |
getNames()
Returns the list of names of references available through this Locator.
|
void |
register(String name,
Class clazz)
Registers a class related to a name.
|
void |
register(String name,
LocatorObjectFactory factory)
Registers an object factory related to a name.
|
void |
register(String name,
String description,
Class clazz)
Registers a class related to a name.
|
void |
register(String name,
String description,
LocatorObjectFactory factory)
Registers an object factory related to a name.
|
void |
registerDefault(String name,
Class clazz) |
void |
registerDefault(String name,
String description,
Class clazz) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocatorName
public Object get(String name) throws LocatorException
Locator
get
in interface Locator
name
- of the object to returnLocatorException
- if there is no access to the class or the class cannot be
instantiatedpublic boolean exists(String name)
Locator_withExists
exists
in interface Locator_withExists
name
- of the object to returnpublic String[] getNames()
Locator
public void register(String name, Class clazz)
Locator
Locator.get(String)
method.public void registerDefault(String name, Class clazz)
registerDefault
in interface Locator
public void register(String name, String description, Class clazz)
Locator
Locator.get(String)
method.public void registerDefault(String name, String description, Class clazz)
registerDefault
in interface Locator
public void register(String name, LocatorObjectFactory factory)
Locator
Locator.get(String)
method.public void register(String name, String description, LocatorObjectFactory factory)
Locator
Locator.get(String)
method.