public abstract class AbstractLocator extends java.lang.Object implements Locator, Locator_withExists
Constructor and Description |
---|
AbstractLocator() |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.lang.String name)
Returns true if exists a manager registered for this name.
|
java.lang.Object |
get(java.lang.String name)
Returns a reference to the object with the given name.
|
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.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocatorName
public java.lang.Object get(java.lang.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(java.lang.String name)
Locator_withExists
exists
in interface Locator_withExists
name
- of the object to returnpublic java.lang.String[] getNames()
Locator
public void register(java.lang.String name, java.lang.Class clazz)
Locator
Locator.get(String)
method.public void registerDefault(java.lang.String name, java.lang.Class clazz)
registerDefault
in interface Locator
public void register(java.lang.String name, java.lang.String description, java.lang.Class clazz)
Locator
Locator.get(String)
method.public void registerDefault(java.lang.String name, java.lang.String description, java.lang.Class clazz)
registerDefault
in interface Locator
public void register(java.lang.String name, LocatorObjectFactory factory)
Locator
Locator.get(String)
method.public void register(java.lang.String name, java.lang.String description, LocatorObjectFactory factory)
Locator
Locator.get(String)
method.public java.lang.String toString()
toString
in class java.lang.Object