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 @ 43939
History | View | Annotate | Download (1.41 KB)
1 |
package org.gvsig.expressionevaluator; |
---|---|
2 |
|
3 |
import java.util.Iterator; |
4 |
import org.gvsig.expressionevaluator.Code.Caller.Arguments; |
5 |
import org.gvsig.tools.visitor.Visitable; |
6 |
|
7 |
public interface Code extends Visitable { |
8 |
|
9 |
public static final int UNDEFINED = -1; |
10 |
public static final int CONSTANT = 0; |
11 |
public static final int IDENTIFIER = 1; |
12 |
public static final int CALLER = 2; |
13 |
public static final int METHOD = 3; |
14 |
|
15 |
|
16 |
public interface Constant extends Code { |
17 |
|
18 |
public Object value(); |
19 |
|
20 |
} |
21 |
|
22 |
public interface Identifier extends Code { |
23 |
|
24 |
public String name(); |
25 |
|
26 |
} |
27 |
|
28 |
public interface Caller extends Code { |
29 |
|
30 |
public interface Arguments extends Iterable<Code>, Visitable { |
31 |
|
32 |
public int count(); |
33 |
|
34 |
@Override
|
35 |
public Iterator<Code> iterator(); |
36 |
|
37 |
public Code get(int i); |
38 |
} |
39 |
|
40 |
public static final int FUNCTION = 0; |
41 |
public static final int BINARY_OPERATOR = 1; |
42 |
public static final int UNARY_OPERATOR = 2; |
43 |
|
44 |
public String name(); |
45 |
|
46 |
public Object call(Interpreter interpreter, Object[] args) throws Exception; |
47 |
|
48 |
public Function function();
|
49 |
|
50 |
public Function function(Function function);
|
51 |
|
52 |
public Arguments args();
|
53 |
|
54 |
public int type(); |
55 |
|
56 |
} |
57 |
|
58 |
public interface Method extends Caller { |
59 |
public Code obj();
|
60 |
|
61 |
public String methodname(); |
62 |
} |
63 |
|
64 |
int code();
|
65 |
} |