svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.lib / org.gvsig.expressionevaluator.lib.api / src / main / java / org / gvsig / expressionevaluator / Code.java @ 44139
History | View | Annotate | Download (1.1 KB)
1 |
package org.gvsig.expressionevaluator; |
---|---|
2 |
|
3 |
import org.gvsig.tools.visitor.Visitable; |
4 |
|
5 |
public interface Code extends Visitable { |
6 |
|
7 |
public static final int UNDEFINED = -1; |
8 |
public static final int CONSTANT = 0; |
9 |
public static final int IDENTIFIER = 1; |
10 |
public static final int CALLER = 2; |
11 |
public static final int METHOD = 3; |
12 |
|
13 |
|
14 |
public interface Constant extends Code { |
15 |
|
16 |
public Object value(); |
17 |
|
18 |
} |
19 |
|
20 |
public interface Identifier extends Code { |
21 |
|
22 |
public String name(); |
23 |
|
24 |
} |
25 |
|
26 |
public interface Caller extends Code { |
27 |
|
28 |
public static final int FUNCTION = 0; |
29 |
public static final int BINARY_OPERATOR = 1; |
30 |
public static final int UNARY_OPERATOR = 2; |
31 |
|
32 |
public String name(); |
33 |
|
34 |
public Object call(Interpreter interpreter, Object[] args) throws Exception; |
35 |
|
36 |
public Function function();
|
37 |
|
38 |
public Function function(Function function);
|
39 |
|
40 |
public Codes args();
|
41 |
|
42 |
public int type(); |
43 |
|
44 |
} |
45 |
|
46 |
public interface Method extends Caller { |
47 |
public Code obj();
|
48 |
|
49 |
public String methodname(); |
50 |
} |
51 |
|
52 |
int code();
|
53 |
} |