KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mchange > v2 > codegen > bean > SimpleProperty


1 /*
2  * Distributed as part of c3p0 v.0.9.1
3  *
4  * Copyright (C) 2005 Machinery For Change, Inc.
5  *
6  * Author: Steve Waldman <swaldman@mchange.com>
7  *
8  * This library is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License version 2.1, as
10  * published by the Free Software Foundation.
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
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this software; see the file LICENSE. If not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */

22
23
24 package com.mchange.v2.codegen.bean;
25
26 import java.lang.reflect.Modifier JavaDoc;
27
28 public class SimpleProperty implements Property
29 {
30     int variable_modifiers;
31     String JavaDoc name;
32     String JavaDoc simpleTypeName;
33     String JavaDoc defensiveCopyExpression;
34     String JavaDoc defaultValueExpression;
35     int getter_modifiers;
36     int setter_modifiers;
37     boolean is_read_only;
38     boolean is_bound;
39     boolean is_constrained;
40
41     public int getVariableModifiers() { return variable_modifiers; }
42     public String JavaDoc getName() { return name; }
43     public String JavaDoc getSimpleTypeName() { return simpleTypeName; }
44     public String JavaDoc getDefensiveCopyExpression() { return defensiveCopyExpression; }
45     public String JavaDoc getDefaultValueExpression() { return defaultValueExpression; }
46     public int getGetterModifiers() { return getter_modifiers; }
47     public int getSetterModifiers() { return setter_modifiers; }
48     public boolean isReadOnly() { return is_read_only; }
49     public boolean isBound() { return is_bound; }
50     public boolean isConstrained() { return is_constrained; }
51
52     public SimpleProperty( int variable_modifiers,
53                String JavaDoc name,
54                String JavaDoc simpleTypeName,
55                String JavaDoc defensiveCopyExpression,
56                String JavaDoc defaultValueExpression,
57                int getter_modifiers,
58                int setter_modifiers,
59                boolean is_read_only,
60                boolean is_bound,
61                boolean is_constrained )
62     {
63     this.variable_modifiers = variable_modifiers;
64     this.name = name;
65     this.simpleTypeName = simpleTypeName;
66     this.defensiveCopyExpression = defensiveCopyExpression;
67     this.defaultValueExpression = defaultValueExpression;
68     this.getter_modifiers = getter_modifiers;
69     this.setter_modifiers = setter_modifiers;
70     this.is_read_only = is_read_only;
71     this.is_bound = is_bound;
72     this.is_constrained = is_constrained;
73     }
74
75     public SimpleProperty( String JavaDoc name,
76                String JavaDoc simpleTypeName,
77                String JavaDoc defensiveCopyExpression,
78                String JavaDoc defaultValueExpression,
79                boolean is_read_only,
80                boolean is_bound,
81                boolean is_constrained )
82     {
83     this ( Modifier.PRIVATE,
84            name,
85            simpleTypeName,
86            defensiveCopyExpression,
87            defaultValueExpression,
88            Modifier.PUBLIC,
89            Modifier.PUBLIC,
90            is_read_only,
91            is_bound,
92            is_constrained );
93     }
94 }
95
Popular Tags