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 @ 43809
History | View | Annotate | Download (1.24 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 |
|
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 interface Arguments extends Iterable<Code>, Visitable { |
29 |
|
30 |
public int count(); |
31 |
|
32 |
@Override
|
33 |
public Iterator<Code> iterator(); |
34 |
|
35 |
public Code get(int i); |
36 |
} |
37 |
|
38 |
public static final int FUNCTION = 0; |
39 |
public static final int BINARY_OPERATOR = 1; |
40 |
public static final int UNARY_OPERATOR = 2; |
41 |
|
42 |
public String name(); |
43 |
|
44 |
public Object call(Interpreter interpreter, Object[] args) throws Exception; |
45 |
|
46 |
public Function function();
|
47 |
|
48 |
public Function function(Function function);
|
49 |
|
50 |
public Arguments args();
|
51 |
|
52 |
public int type(); |
53 |
|
54 |
} |
55 |
|
56 |
int code();
|
57 |
} |