01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: * $Header:$
18: */
19: package org.apache.beehive.controls.runtime.generator;
20:
21: /**
22: * A property derived from a getter/setter method of the control interface.
23: */
24: public final class AptControlInterfaceProperty {
25: private final String _name;
26: private String _setterName;
27: private String _getterName;
28:
29: /**
30: * Constructs a new AptControlInterfaceProperty instance.
31: *
32: * @param name Property name, may not be null.
33: * @param getterName Getter method name, may be null.
34: * @param setterName Setter method name, may be null.
35: */
36: public AptControlInterfaceProperty(String name, String getterName,
37: String setterName) {
38: assert name != null;
39: _name = name;
40: _getterName = getterName;
41: _setterName = setterName;
42: }
43:
44: /**
45: * Set the setter method name.
46: *
47: * @param setterName
48: */
49: protected void setSetterName(String setterName) {
50: _setterName = setterName;
51: }
52:
53: /**
54: * Set the getter method name.
55: *
56: * @param getterName
57: */
58: protected void setGetterName(String getterName) {
59: _getterName = getterName;
60: }
61:
62: /**
63: * Get the setter method name.
64: *
65: * @return setter method name, may be null.
66: */
67: public String getSetterName() {
68: return _setterName;
69: }
70:
71: /**
72: * Get the getter method name.
73: *
74: * @return getter method name, may be null.
75: */
76: public String getGetterName() {
77: return _getterName;
78: }
79:
80: /**
81: * Get the property name.
82: *
83: * @return Property name.
84: */
85: public String getName() {
86: return _name;
87: }
88: }
|