KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jicengine > operation > Context


1 package org.jicengine.operation;
2
3
4 /**
5  * Context : a namespace for objects.
6  *
7  * <p>
8  * Copyright (C) 2004 Timo Laitinen
9  * </p>
10  * @author Timo Laitinen
11  * @created 2004-09-20
12  * @since JICE-0.10
13  */

14
15 public interface Context {
16
17     /**
18      * finds an object from the context.
19      *
20      * @return the object. NOTE: currently no null values supported.
21      * @throws ObjectNotFoundException if the context doesn't have an object
22      * with the given name.
23      */

24     public Object JavaDoc getObject(String JavaDoc name) throws ObjectNotFoundException;
25
26     public boolean hasObject(String JavaDoc name);
27
28     /**
29      * If addObject success, the object stored will be returned by getObject
30      * with the same name.
31      *
32      * @throws DuplicateNameException if there already is another object with the
33      * same name in the context.
34      */

35     public void addObject(String JavaDoc name, Object JavaDoc object) throws DuplicateNameException;
36
37     /**
38      * Returns a copy of this context.
39      *
40      * @return Context
41      */

42     public Context replicate();
43 }
44
Popular Tags