jdsl.core.ref
Class AlwaysInvalidLocator
java.lang.Object
|
+--jdsl.core.ref.AlwaysInvalidLocator
- public class AlwaysInvalidLocator
- extends java.lang.Object
- implements Locator
A Locator that explodes, no matter what you do to it. It is used
as the return from methods that return a locator but that
sometimes have an error return.
- Author:
- Mark Handy
|
Method Summary |
Container |
container()
Throws an InvalidLocatorException when an attempt is made
to access the container of this locator. |
java.lang.Object |
element()
Throws an InvalidLocatorException when an attempt is made
to access the element of this locator. |
boolean |
isContained()
Throws an InvalidLocatorException when an attempt is made
to find out if this locator is contained or not. |
java.lang.Object |
key()
Throws an InvalidLocatorException when an attempt is made
to access the key of this locator. |
java.lang.String |
toString()
Returns a string representation of this AlwaysInvalidLocator. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AlwaysInvalidLocator
public AlwaysInvalidLocator(java.lang.String label)
- Class Constructor.
- Parameters:
label - Why this locator was created.
key
public java.lang.Object key()
- Throws an InvalidLocatorException when an attempt is made
to access the key of this locator.
- Specified by:
- key in interface Locator
- Returns:
- nothing, since an exception is always thrown.
element
public java.lang.Object element()
- Throws an InvalidLocatorException when an attempt is made
to access the element of this locator.
- Specified by:
- element in interface Locator
- Returns:
- nothing, since an exception is always thrown.
container
public Container container()
- Throws an InvalidLocatorException when an attempt is made
to access the container of this locator.
- Specified by:
- container in interface Locator
- Returns:
- nothing, since an exception is always thrown.
isContained
public boolean isContained()
- Throws an InvalidLocatorException when an attempt is made
to find out if this locator is contained or not.
- Specified by:
- isContained in interface Locator
- Returns:
- nothing, since an exception is always thrown.
toString
public java.lang.String toString()
- Returns a string representation of this AlwaysInvalidLocator.
- Returns:
- a string representating this Locator.
- Overrides:
- toString in class java.lang.Object