Revision 47734 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
Code.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import org.apache.commons.lang3.StringUtils; |
4 | 4 |
import org.gvsig.expressionevaluator.ExpressionBuilder.Value; |
5 |
import org.gvsig.expressionevaluator.spi.PrettyFormaterImpl; |
|
5 | 6 |
import org.gvsig.tools.visitor.FilteredVisitable; |
6 | 7 |
|
7 | 8 |
public interface Code extends FilteredVisitable, org.gvsig.tools.lang.Cloneable { |
... | ... | |
96 | 97 |
public Object call(Interpreter interpreter, Object[] args) throws Exception; |
97 | 98 |
} |
98 | 99 |
|
99 |
public static final Formatter<Code> EMPTY_FORMATTER = new Formatter<Code>() { |
|
100 |
public static class EmptyFormatter extends PrettyFormaterImpl implements Formatter<Code> { |
|
101 |
|
|
102 |
public EmptyFormatter() { |
|
103 |
|
|
104 |
} |
|
105 |
|
|
106 |
public EmptyFormatter(boolean useNl, int indentSize) { |
|
107 |
super.setIndentSize(indentSize); |
|
108 |
super.setUseNl(useNl); |
|
109 |
} |
|
110 |
|
|
100 | 111 |
@Override |
101 | 112 |
public boolean canApply(Code value) { |
102 | 113 |
return false; |
... | ... | |
106 | 117 |
public String format(Code value) { |
107 | 118 |
return ""; |
108 | 119 |
} |
109 |
}; |
|
110 | 120 |
|
121 |
@Override |
|
122 |
public void setIndentSize(int indentSize) { |
|
123 |
throw new UnsupportedOperationException(); |
|
124 |
} |
|
125 |
|
|
126 |
@Override |
|
127 |
public void setUseNl(boolean useNl) { |
|
128 |
throw new UnsupportedOperationException(); |
|
129 |
} |
|
130 |
|
|
131 |
} |
|
132 |
|
|
133 |
public static final Formatter<Code> EMPTY_FORMATTER = new EmptyFormatter(); |
|
134 |
|
|
111 | 135 |
public int code(); |
112 | 136 |
|
113 | 137 |
public Value toValue(); |
Also available in: Unified diff