01: /*
02: * Copyright 2005 Joe Walker
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.extend;
17:
18: /**
19: * An {@link OutboundVariable} that we know to be unable to recurse
20: * @author Joe Walker [joe at getahead dot ltd dot uk]
21: */
22: public class NonNestedOutboundVariable implements OutboundVariable {
23: /**
24: * Create a new NonNestedOutboundVariable
25: */
26: public NonNestedOutboundVariable(String assignCode) {
27: this .assignCode = assignCode;
28: }
29:
30: /* (non-Javadoc)
31: * @see org.directwebremoting.extend.OutboundVariable#prepareAssignCode()
32: */
33: public void prepareAssignCode() {
34: }
35:
36: /* (non-Javadoc)
37: * @see org.directwebremoting.extend.OutboundVariable#prepareBuildDeclareCodes()
38: */
39: public void prepareBuildDeclareCodes() {
40: }
41:
42: /* (non-Javadoc)
43: * @see org.directwebremoting.OutboundVariable#getDeclareCode()
44: */
45: public String getDeclareCode() {
46: return "";
47: }
48:
49: /* (non-Javadoc)
50: * @see org.directwebremoting.OutboundVariable#getBuildCode()
51: */
52: public String getBuildCode() {
53: return "";
54: }
55:
56: /* (non-Javadoc)
57: * @see org.directwebremoting.OutboundVariable#getAssignCode()
58: */
59: public String getAssignCode() {
60: return assignCode;
61: }
62:
63: /* (non-Javadoc)
64: * @see org.directwebremoting.OutboundVariable#getReference()
65: */
66: public OutboundVariable getReferenceVariable() {
67: return this ;
68: }
69:
70: /* (non-Javadoc)
71: * @see java.lang.Object#toString()
72: */
73: @Override
74: public String toString() {
75: return "NonNestedOutboundVariable(" + getAssignCode() + ")";
76: }
77:
78: /**
79: * The variable that we refer to
80: */
81: private String assignCode;
82: }
|