2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to you under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.shale.tiger.config;
19  
20  import org.apache.shale.tiger.managed.Bean;
21  import org.apache.shale.tiger.managed.Property;
22  import org.apache.shale.tiger.managed.Scope;
23  import org.apache.shale.tiger.managed.Value;
24  
25  /***
26   * <p>JavaBean class for testing.</p>
27   */
28  @Bean(name="bean2", scope=Scope.APPLICATION)
29  public class TestBean {
30      
31      /*** Creates a new instance of TestBean */
32      public TestBean() {
33      }
34  
35      /***
36       * Holds value of property byteProperty.
37       */
38      @Property("-1")
39      private byte byteProperty = (byte) 1;
40  
41      /***
42       * Getter for property byteProperty.
43       * @return Value of property byteProperty.
44       */
45      public byte getByteProperty() {
46  
47          return this.byteProperty;
48      }
49  
50      /***
51       * Setter for property byteProperty.
52       * @param byteProperty New value of property byteProperty.
53       */
54      public void setByteProperty(byte byteProperty) {
55  
56          this.byteProperty = byteProperty;
57      }
58  
59      /***
60       * Holds value of property charProperty.
61       */
62      @Value("z")
63      private char charProperty = 'a';
64  
65      /***
66       * Getter for property charProperty.
67       * @return Value of property charProperty.
68       */
69      public char getCharProperty() {
70  
71          return this.charProperty;
72      }
73  
74      /***
75       * Setter for property charProperty.
76       * @param charProperty New value of property charProperty.
77       */
78      public void setCharProperty(char charProperty) {
79  
80          this.charProperty = charProperty;
81      }
82  
83      /***
84       * Holds value of property doubleProperty.
85       */
86      @Property(name="doubleProperty", value="-2.0")
87      private double m_doubleProperty = (double) 2.0;
88  
89      /***
90       * Getter for property doubleProperty.
91       * @return Value of property doubleProperty.
92       */
93      public double getDoubleProperty() {
94  
95          return this.m_doubleProperty;
96      }
97  
98      /***
99       * Setter for property doubleProperty.
100      * @param doubleProperty New value of property doubleProperty.
101      */
102     public void setDoubleProperty(double doubleProperty) {
103 
104         this.m_doubleProperty = doubleProperty;
105     }
106     
107     /***
108      * Holds value of property floatProperty.
109      */
110     @Value("-3.0")
111     private float floatProperty = (float) 3.0;
112 
113     /***
114      * Getter for property floatProperty.
115      * @return Value of property floatProperty.
116      */
117     public float getFloatProperty() {
118 
119         return this.floatProperty;
120     }
121 
122     /***
123      * Setter for property floatProperty.
124      * @param floatProperty New value of property floatProperty.
125      */
126     public void setFloatProperty(float floatProperty) {
127 
128         this.floatProperty = floatProperty;
129     }
130 
131     /***
132      * Holds value of property intProperty.
133      */
134     @Property(name="intProperty", value="-4")
135     private int _intProperty = 4;
136 
137     /***
138      * Getter for property intProperty.
139      * @return Value of property intProperty.
140      */
141     public int getIntProperty() {
142 
143         return this._intProperty;
144     }
145 
146     /***
147      * Setter for property intProperty.
148      * @param intProperty New value of property intProperty.
149      */
150     public void setIntProperty(int intProperty) {
151 
152         this._intProperty = intProperty;
153     }
154 
155     /***
156      * Holds value of property longProperty.
157      */
158     @Value("-5")
159     private long longProperty = (long) 5;
160 
161     /***
162      * Getter for property longProperty.
163      * @return Value of property longProperty.
164      */
165     public long getLongProperty() {
166 
167         return this.longProperty;
168     }
169 
170     /***
171      * Setter for property longProperty.
172      * @param longProperty New value of property longProperty.
173      */
174     public void setLongProperty(long longProperty) {
175 
176         this.longProperty = longProperty;
177     }
178 
179     /***
180      * Holds value of property shortProperty.
181      */
182     @Property("-6")
183     private short shortProperty = (short) 6;
184 
185     /***
186      * Getter for property shortProperty.
187      * @return Value of property shortProperty.
188      */
189     public short getShortProperty() {
190 
191         return this.shortProperty;
192     }
193 
194     /***
195      * Setter for property shortProperty.
196      * @param shortProperty New value of property shortProperty.
197      */
198     public void setShortProperty(short shortProperty) {
199 
200         this.shortProperty = shortProperty;
201     }
202 
203     /***
204      * Holds value of property stringProperty.
205      */
206     @Value("Annotated")
207     private String stringProperty = "String";
208 
209     /***
210      * Getter for property stringProperty.
211      * @return Value of property stringProperty.
212      */
213     public String getStringProperty() {
214 
215         return this.stringProperty;
216     }
217 
218     /***
219      * Setter for property stringProperty.
220      * @param stringProperty New value of property stringProperty.
221      */
222     public void setStringProperty(String stringProperty) {
223 
224         this.stringProperty = stringProperty;
225     }
226 
227 }