01: package org.jicengine.element;
02:
03: import org.jicengine.operation.*;
04:
05: /**
06: *
07: *
08: * <p>
09: * Copyright (C) 2004 Timo Laitinen
10: * </p>
11: * @author Timo Laitinen
12: * @created 2004-09-20
13: * @since JICE-0.10
14: *
15: */
16:
17: public class StaticValueElement extends AbstractElement implements
18: VariableElement {
19: private Object value;
20:
21: public StaticValueElement(String name, Location location,
22: Object value) {
23: super (name, location);
24: this .value = value;
25: }
26:
27: public Object getValue(Context context, Object parentInstance) {
28: return this .value;
29: }
30:
31: public boolean isExecuted(Context context, Object parentInstance) {
32: return true;
33: }
34:
35: public Class getInstanceClass() {
36: return this.value.getClass();
37: }
38: }
|