|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Context : a namespace for objects.
Nested Class Summary | |
static class |
Context.DuplicateNameException
|
static class |
Context.ObjectNotFoundException
|
Method Summary | |
void |
addObject(java.lang.String name,
java.lang.Object object)
If addObject success, the object stored will be returned by getObject with the same name. |
java.lang.Object |
getObject(java.lang.String name)
finds an object from the context. |
boolean |
hasObject(java.lang.String name)
|
Method Detail |
public java.lang.Object getObject(java.lang.String name) throws Context.ObjectNotFoundException
Context.ObjectNotFoundException
- if the context doesn't have an object
with the given name.public boolean hasObject(java.lang.String name)
public void addObject(java.lang.String name, java.lang.Object object) throws Context.DuplicateNameException
Context.DuplicateNameException
- if there already is another object with the
same name in the context.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |