001: /*
002: * Distributed as part of c3p0 v.0.9.1.2
003: *
004: * Copyright (C) 2005 Machinery For Change, Inc.
005: *
006: * Author: Steve Waldman <swaldman@mchange.com>
007: *
008: * This library is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU Lesser General Public License version 2.1, as
010: * published by the Free Software Foundation.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public License
018: * along with this software; see the file LICENSE. If not, write to the
019: * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: */
022:
023: package com.mchange.v2.codegen.bean;
024:
025: import java.lang.reflect.Modifier;
026:
027: public class SimpleProperty implements Property {
028: int variable_modifiers;
029: String name;
030: String simpleTypeName;
031: String defensiveCopyExpression;
032: String defaultValueExpression;
033: int getter_modifiers;
034: int setter_modifiers;
035: boolean is_read_only;
036: boolean is_bound;
037: boolean is_constrained;
038:
039: public int getVariableModifiers() {
040: return variable_modifiers;
041: }
042:
043: public String getName() {
044: return name;
045: }
046:
047: public String getSimpleTypeName() {
048: return simpleTypeName;
049: }
050:
051: public String getDefensiveCopyExpression() {
052: return defensiveCopyExpression;
053: }
054:
055: public String getDefaultValueExpression() {
056: return defaultValueExpression;
057: }
058:
059: public int getGetterModifiers() {
060: return getter_modifiers;
061: }
062:
063: public int getSetterModifiers() {
064: return setter_modifiers;
065: }
066:
067: public boolean isReadOnly() {
068: return is_read_only;
069: }
070:
071: public boolean isBound() {
072: return is_bound;
073: }
074:
075: public boolean isConstrained() {
076: return is_constrained;
077: }
078:
079: public SimpleProperty(int variable_modifiers, String name,
080: String simpleTypeName, String defensiveCopyExpression,
081: String defaultValueExpression, int getter_modifiers,
082: int setter_modifiers, boolean is_read_only,
083: boolean is_bound, boolean is_constrained) {
084: this .variable_modifiers = variable_modifiers;
085: this .name = name;
086: this .simpleTypeName = simpleTypeName;
087: this .defensiveCopyExpression = defensiveCopyExpression;
088: this .defaultValueExpression = defaultValueExpression;
089: this .getter_modifiers = getter_modifiers;
090: this .setter_modifiers = setter_modifiers;
091: this .is_read_only = is_read_only;
092: this .is_bound = is_bound;
093: this .is_constrained = is_constrained;
094: }
095:
096: public SimpleProperty(String name, String simpleTypeName,
097: String defensiveCopyExpression,
098: String defaultValueExpression, boolean is_read_only,
099: boolean is_bound, boolean is_constrained) {
100: this(Modifier.PRIVATE, name, simpleTypeName,
101: defensiveCopyExpression, defaultValueExpression,
102: Modifier.PUBLIC, Modifier.PUBLIC, is_read_only,
103: is_bound, is_constrained);
104: }
105: }
|