KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jicengine > element > Element


1 package org.jicengine.element;
2
3 import org.jicengine.operation.Context;
4 import org.jicengine.operation.OperationException;
5
6
7 /**
8  * <p>
9  * Executable/runtime instantiation of a JIC-element. JIC-processing is based
10  * on Elements.
11  * </p>
12  *
13  * <p>
14  * Design-note: getLocation() was removed: it is needed mostly internally by
15  * the element when it throws exeptions. this is a public interface.
16  * </p>
17  *
18  * <p>
19  * Copyright (C) 2004 Timo Laitinen
20  * </p>
21  * @author Timo Laitinen
22  * @created 2004-09-20
23  * @since JICE-0.10
24  *
25  */

26
27 public interface Element {
28
29     /**
30      * Name of a variable that refers to the CDATA section of the element.
31      */

32     public static final String JavaDoc VARIABLE_NAME_CDATA = "cdata";
33
34     /**
35      * Name of a variable that refers to the instance of the parent element.
36      */

37     public static final String JavaDoc VARIABLE_NAME_PARENT_INSTANCE = "parent";
38
39     /**
40      * Name of a variable that refers to the instance of this element.
41      */

42     public static final String JavaDoc VARIABLE_NAME_ELEMENT_INSTANCE = "this";
43
44     /**
45      * The name of this element.
46      *
47      * @return String
48      */

49     public String JavaDoc getName();
50
51     /**
52      * The location of this element in the JIC file.
53      *
54      * @return Location
55      */

56     public Location getLocation();
57
58     /**
59      * For testing whether this element should be executed or not. The execution
60      * methods in subinterfaces VariableElement and ActionElement should be called
61      * only if this returns true.
62      *
63      * @param outerContext Context
64      * @return boolean
65      * @throws OperationException
66      */

67     public boolean isExecuted(Context outerContext, Object JavaDoc parentInstance) throws ElementException;
68
69 }
70
Popular Tags