001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.el;
018
019import java.beans.PropertyDescriptor;
020import java.lang.reflect.Method;
021
022/**
023 *
024 * <p>This contains the information for one property in a BeanInfo -
025 * PropertyDescriptor, read method, and write method.  This class is
026 * necessary because the read/write methods in the PropertyDescriptor
027 * may not be accessible if the bean given to the introspector is not
028 * a public class.  In this case, a publicly accessible version of the
029 * method must be found by searching for a public superclass/interface
030 * that declares the method (this searching is done by the
031 * BeanInfoManager).
032 * 
033 * @author Nathan Abramson - Art Technology Group
034 * @version $Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author: bayard $
035 **/
036
037public class BeanInfoProperty
038{
039  //-------------------------------------
040  // Properties
041  //-------------------------------------
042  // property readMethod
043
044  Method mReadMethod;
045  public Method getReadMethod ()
046  { return mReadMethod; }
047
048  //-------------------------------------
049  // property writeMethod
050
051  Method mWriteMethod;
052  public Method getWriteMethod ()
053  { return mWriteMethod; }
054
055  //-------------------------------------
056  // property propertyDescriptor
057
058  PropertyDescriptor mPropertyDescriptor;
059  public PropertyDescriptor getPropertyDescriptor ()
060  { return mPropertyDescriptor; }
061
062  //-------------------------------------
063  /**
064   *
065   * Constructor
066   **/
067  public BeanInfoProperty (Method pReadMethod,
068                           Method pWriteMethod,
069                           PropertyDescriptor pPropertyDescriptor)
070  {
071    mReadMethod = pReadMethod;
072    mWriteMethod = pWriteMethod;
073    mPropertyDescriptor = pPropertyDescriptor;
074  }
075
076  //-------------------------------------
077}