01: package org.jicengine.expression;
02:
03: import org.jicengine.operation.StaticValue;
04:
05: import org.jicengine.operation.Operation;
06:
07: /**
08: * <p>
09: * Copyright (C) 2004 Timo Laitinen
10: * </p>
11: *
12: * @author Timo Laitinen
13: * @created 2004-09-20
14: * @since JICE-0.10
15: */
16:
17: public abstract class StaticValueParser implements Parser {
18:
19: public final Operation parse(String expression)
20: throws SyntaxException {
21: Object value = parseValue(expression);
22: if (value != null) {
23: return new StaticValue(value);
24: } else {
25: return null;
26: }
27: }
28:
29: protected abstract Object parseValue(String expression)
30: throws SyntaxException;
31: }
|