KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jicengine > element > StaticValueElement


1 package org.jicengine.element;
2
3
4 import org.jicengine.operation.*;
5 /**
6  *
7  *
8  * <p>
9  * 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 VariableElement {
18     private Object JavaDoc value;
19
20     public StaticValueElement(String JavaDoc name, Location location, Object JavaDoc value)
21     {
22         super(name, location);
23         this.value = value;
24     }
25
26     public Object JavaDoc getValue(Context context, Object JavaDoc parentInstance)
27     {
28         return this.value;
29     }
30
31     public boolean isExecuted(Context context, Object JavaDoc parentInstance)
32     {
33         return true;
34     }
35   
36   public Class JavaDoc getInstanceClass()
37   {
38     return this.value.getClass();
39   }
40 }
41
Popular Tags