KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > dwrp > ReferenceOutboundVariable


1 /*
2  * Copyright 2005 Joe Walker
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.directwebremoting.dwrp;
17
18 import org.directwebremoting.extend.OutboundVariable;
19
20 /**
21  * An OutboundVariable that simply refers to one defined elsewhere
22  * @author Joe Walker [joe at getahead dot ltd dot uk]
23  */

24 public class ReferenceOutboundVariable implements OutboundVariable
25 {
26     /**
27      * Create a new ReferenceOutboundVariable
28      * @param assignCode The name of the variable to refer to
29      */

30     public ReferenceOutboundVariable(String JavaDoc assignCode)
31     {
32         this.assignCode = assignCode;
33     }
34
35     /* (non-Javadoc)
36      * @see org.directwebremoting.OutboundVariable#getAssignCode()
37      */

38     public String JavaDoc getAssignCode()
39     {
40         return assignCode;
41     }
42
43     /* (non-Javadoc)
44      * @see org.directwebremoting.OutboundVariable#getDeclareCode()
45      */

46     public String JavaDoc getDeclareCode()
47     {
48         return "";
49     }
50
51     /* (non-Javadoc)
52      * @see org.directwebremoting.OutboundVariable#getBuildCode()
53      */

54     public String JavaDoc getBuildCode()
55     {
56         return "";
57     }
58
59     /* (non-Javadoc)
60      * @see org.directwebremoting.OutboundVariable#getReference()
61      */

62     public OutboundVariable getReferenceVariable()
63     {
64         return this;
65     }
66
67     /* (non-Javadoc)
68      * @see java.lang.Object#toString()
69      */

70     public String JavaDoc toString()
71     {
72         return "ReferenceOV(" + assignCode + ")";
73     }
74
75     /**
76      * The variable that we refer to
77      */

78     private String JavaDoc assignCode;
79 }
80
Popular Tags