KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > mx > mxbean > support > SimpleMXBeanSupport


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2006, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.test.mx.mxbean.support;
23
24 import java.math.BigDecimal JavaDoc;
25 import java.math.BigInteger JavaDoc;
26 import java.util.Date JavaDoc;
27
28 import javax.management.ObjectName JavaDoc;
29
30 import org.jboss.mx.mxbean.MXBeanSupport;
31
32 /**
33  * SimpleMXBeanSupport.
34  *
35  * @author <a HREF="adrian@jboss.com">Adrian Brock</a>
36  * @version $Revision: 1.1 $
37  */

38 public class SimpleMXBeanSupport extends MXBeanSupport implements SimpleMXBeanSupportMXBean
39 {
40    private BigDecimal JavaDoc bigDecimal = bigDecimalValue;
41    private BigInteger JavaDoc bigInteger = bigIntegerValue;
42    private Boolean JavaDoc booleanV = booleanValue;
43    private Byte JavaDoc byteV = byteValue;
44    private Character JavaDoc characterV = characterValue;
45    private Date JavaDoc date = dateValue;
46    private Double JavaDoc doubleV = doubleValue;
47    private Float JavaDoc floatV = floatValue;
48    private Integer JavaDoc integer = integerValue;
49    private Long JavaDoc longV = longValue;
50    private ObjectName JavaDoc objectName = objectNameValue;
51    private boolean primitiveBoolean = primitiveBooleanValue;
52    private byte primitiveByte = primitiveByteValue;
53    private char primitiveChar = primitiveCharValue;
54    private double primitiveDouble = primitiveDoubleValue;
55    private float primitiveFloat = primitiveFloatValue;
56    private int primitiveInt = primitiveIntValue;
57    private long primitiveLong = primitiveLongValue;
58    private Short JavaDoc shortV = shortValue;
59    private short primitiveShort = primitiveShortValue;
60    private String JavaDoc string = stringValue;
61
62    public BigDecimal JavaDoc getBigDecimal()
63    {
64       return bigDecimal;
65    }
66    
67    public BigInteger JavaDoc getBigInteger()
68    {
69       return bigInteger;
70    }
71
72    public Boolean JavaDoc getBoolean()
73    {
74       return booleanV;
75    }
76
77    public Byte JavaDoc getByte()
78    {
79       return byteV;
80    }
81    
82    public Character JavaDoc getCharacter()
83    {
84       return characterV;
85    }
86
87    public Date JavaDoc getDate()
88    {
89       return date;
90    }
91
92    public Double JavaDoc getDouble()
93    {
94       return doubleV;
95    }
96
97    public Float JavaDoc getFloat()
98    {
99       return floatV;
100    }
101
102    public Integer JavaDoc getInteger()
103    {
104       return integer;
105    }
106
107    public Long JavaDoc getLong()
108    {
109       return longV;
110    }
111
112    public ObjectName JavaDoc getObjectName()
113    {
114       return objectName;
115    }
116
117    public byte getPrimitiveByte()
118    {
119       return primitiveByte;
120    }
121
122    public char getPrimitiveChar()
123    {
124       return primitiveChar;
125    }
126
127    public double getPrimitiveDouble()
128    {
129       return primitiveDouble;
130    }
131
132    public float getPrimitiveFloat()
133    {
134       return primitiveFloat;
135    }
136
137    public int getPrimitiveInt()
138    {
139       return primitiveInt;
140    }
141
142    public long getPrimitiveLong()
143    {
144       return primitiveLong;
145    }
146
147    public short getPrimitiveShort()
148    {
149       return primitiveShort;
150    }
151
152    public Short JavaDoc getShort()
153    {
154       return shortV;
155    }
156
157    public String JavaDoc getString()
158    {
159       return string;
160    }
161
162    public boolean isPrimitiveBoolean()
163    {
164       return primitiveBoolean;
165    }
166
167    public void setBoolean(Boolean JavaDoc booleanV)
168    {
169       this.booleanV = booleanV;
170    }
171
172    public void setByte(Byte JavaDoc byteV)
173    {
174       this.byteV = byteV;
175    }
176
177    public void setCharacter(Character JavaDoc characterV)
178    {
179       this.characterV = characterV;
180    }
181    
182    public void setDouble(Double JavaDoc doubleV)
183    {
184       this.doubleV = doubleV;
185    }
186    
187    public void setFloat(Float JavaDoc floatV)
188    {
189       this.floatV = floatV;
190    }
191
192    public void setLong(Long JavaDoc longV)
193    {
194       this.longV = longV;
195    }
196
197    public void setShort(Short JavaDoc shortV)
198    {
199       this.shortV = shortV;
200    }
201
202    public void setBigDecimal(BigDecimal JavaDoc bigDecimal)
203    {
204       this.bigDecimal = bigDecimal;
205    }
206
207    public void setBigInteger(BigInteger JavaDoc bigInteger)
208    {
209       this.bigInteger = bigInteger;
210    }
211
212    public void setDate(Date JavaDoc date)
213    {
214       this.date = date;
215    }
216
217    public void setInteger(Integer JavaDoc integer)
218    {
219       this.integer = integer;
220    }
221
222    public void setObjectName(ObjectName JavaDoc objectName)
223    {
224       this.objectName = objectName;
225    }
226
227    public void setPrimitiveBoolean(boolean primitiveBoolean)
228    {
229       this.primitiveBoolean = primitiveBoolean;
230    }
231
232    public void setPrimitiveByte(byte primitiveByte)
233    {
234       this.primitiveByte = primitiveByte;
235    }
236
237    public void setPrimitiveChar(char primitiveChar)
238    {
239       this.primitiveChar = primitiveChar;
240    }
241
242    public void setPrimitiveDouble(double primitiveDouble)
243    {
244       this.primitiveDouble = primitiveDouble;
245    }
246
247    public void setPrimitiveFloat(float primitiveFloat)
248    {
249       this.primitiveFloat = primitiveFloat;
250    }
251
252    public void setPrimitiveInt(int primitiveInt)
253    {
254       this.primitiveInt = primitiveInt;
255    }
256
257    public void setPrimitiveLong(long primitiveLong)
258    {
259       this.primitiveLong = primitiveLong;
260    }
261
262    public void setPrimitiveShort(short primitiveShort)
263    {
264       this.primitiveShort = primitiveShort;
265    }
266
267    public void setString(String JavaDoc string)
268    {
269       this.string = string;
270    }
271
272    public String JavaDoc echoReverse(String JavaDoc string)
273    {
274       StringBuilder JavaDoc builder = new StringBuilder JavaDoc(string);
275       builder.reverse();
276       return builder.toString();
277    }
278 }
279
Popular Tags