View Javadoc

1   /*
2    * Copyright 2005 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at 
7    * 
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software 
11   * distributed under the License is distributed on an "AS IS" BASIS, 
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
13   * See the License for the specific language governing permissions and 
14   * limitations under the License.
15   */
16  
17  package org.apache.jdo.model.java;
18  
19  /***
20   * A JavaProperty instance represents a JavaBeans property.
21   * 
22   * @author Michael Bouschen
23   * @version JDO 2.0
24   */
25  public interface JavaProperty extends JavaField
26  {
27      /***
28       * Returns the JavaMethod representation of the getter method for this
29       * JavaProperty. If there is no getter method for this JavaProperty
30       * (i.e. the property is write-only), then the method returns
31       * <code>null</code>.
32       * @return the getter method if available; or <code>null</code>
33       * otherwise.
34       */
35      public JavaMethod getGetterMethod();
36  
37      /***
38       * Returns the JavaMethod representation of the setter method for this
39       * JavaProperty. If there is no setter method for this JavaProperty
40       * (i.e. the property is read-only), then the method returns
41       * <code>null</code>.
42       * @return the setter method if available; or <code>null</code>
43       * otherwise.
44       */
45      public JavaMethod getSetterMethod();
46  }