Revision 44198 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

View differences:

Code.java
1 1
package org.gvsig.expressionevaluator;
2 2

  
3
import org.gvsig.expressionevaluator.ExpressionBuilder.Value;
3 4
import org.gvsig.tools.visitor.Visitable;
4 5

  
5 6
public interface Code extends Visitable {
......
9 10
    public static final int IDENTIFIER = 1;
10 11
    public static final int CALLER = 2;
11 12
    public static final int METHOD = 3;
13
    public static final int CODES = 4;
12 14
    
13

  
14 15
    public interface Constant extends Code {
15 16

  
16 17
        public Object value();
......
29 30
        public static final int BINARY_OPERATOR = 1;
30 31
        public static final int UNARY_OPERATOR = 2;
31 32

  
33

  
32 34
        public String name();
33 35

  
34 36
        public Object call(Interpreter interpreter, Object[] args) throws Exception;
......
37 39

  
38 40
        public Function function(Function function);
39 41

  
40
        public Codes args();
42
        public Codes parameters();
41 43

  
42 44
        public int type();
43 45

  
......
49 51
        public String methodname();
50 52
    }
51 53

  
52
    int code();
54
    public static final Formatter<Code> EMPTY_FORMATTER = new Formatter<Code>() {
55
        @Override
56
        public boolean canApply(Code value) {
57
            return false;
58
        }
59

  
60
        @Override
61
        public String format(Code value) {
62
            return "";
63
        }
64
    };
65

  
66
    public int code();
67

  
68
    public Value toValue();
69

  
70
    public Value toValue(ExpressionBuilder builder);
71
    
72
    public String toString(Formatter<Code> formatter);
73
    
74
    public void link(SymbolTable symbolTable);
75
    
53 76
}

Also available in: Unified diff