KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > retrotranslator > tests > TestBean


1 /***
2  * Retrotranslator: a Java bytecode transformer that translates Java classes
3  * compiled with JDK 5.0 into classes that can be run on JVM 1.4.
4  *
5  * Copyright (c) 2005 - 2007 Taras Puchko
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the copyright holders nor the names of its
17  * contributors may be used to endorse or promote products derived from
18  * this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30  * THE POSSIBILITY OF SUCH DAMAGE.
31  */

32 package net.sf.retrotranslator.tests;
33
34 /**
35  * @author Taras Puchko
36  */

37 public class TestBean {
38
39     private boolean visible;
40     private char sign;
41     private byte code;
42     private short width;
43     private int height;
44     private float opacity;
45     private long area;
46     private double weight;
47     private String JavaDoc name;
48     private String JavaDoc direction;
49     private String JavaDoc state;
50
51     public TestBean(
52             boolean visible, char sign, byte code, short width,
53             int height, float opacity, long area, double weight, String JavaDoc name) {
54         this.direction = "right";
55         this.visible = visible;
56         this.sign = sign;
57         this.code = code;
58         this.width = width;
59         this.height = height;
60         this.opacity = opacity;
61         this.area = area;
62         this.weight = weight;
63         this.name = name;
64     }
65
66     public TestBean(
67             String JavaDoc name, double weight, long area, float opacity,
68             int height, short width, byte code, char sign, boolean visible) {
69         this.direction = "reverse";
70         this.name = name;
71         this.weight = weight;
72         this.area = area;
73         this.opacity = opacity;
74         this.height = height;
75         this.width = width;
76         this.code = code;
77         this.sign = sign;
78         this.visible = visible;
79     }
80
81     public TestBean(String JavaDoc state) {
82         this.direction = "A";
83         this.state = state;
84     }
85
86     public TestBean() {
87         this.direction = "B";
88     }
89
90     public boolean isVisible() {
91         return visible;
92     }
93
94     public char getSign() {
95         return sign;
96     }
97
98     public byte getCode() {
99         return code;
100     }
101
102     public short getWidth() {
103         return width;
104     }
105
106     public int getHeight() {
107         return height;
108     }
109
110     public float getOpacity() {
111         return opacity;
112     }
113
114     public long getArea() {
115         return area;
116     }
117
118     public double getWeight() {
119         return weight;
120     }
121
122     public String JavaDoc getName() {
123         return name;
124     }
125
126     public String JavaDoc getDirection() {
127         return direction;
128     }
129
130     public String JavaDoc getState() {
131         return state;
132     }
133
134     public void setState(String JavaDoc state) {
135         this.state = state;
136     }
137 }
138
Popular Tags