Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.testbeans » [javadoc | source]
    1   // $Header: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testbeans/TestBeanBeanInfo.java,v 1.6 2005/07/12 20:50:43 mstover1 Exp $
    2   /*
    3    * Copyright 2004 The Apache Software Foundation.
    4    *
    5    * Licensed under the Apache License, Version 2.0 (the "License");
    6    * you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    *
    9    *   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   package org.apache.jmeter.testbeans;
   18   
   19   import java.awt.Image;
   20   import java.beans.BeanDescriptor;
   21   import java.beans.BeanInfo;
   22   import java.beans.EventSetDescriptor;
   23   import java.beans.MethodDescriptor;
   24   import java.beans.PropertyDescriptor;
   25   
   26   /**
   27    * This is the BeanInfo object for the TestBean class. It acts as a "stopper"
   28    * for the introspector: we don't want it to look at properties defined at this
   29    * or higher classes.
   30    * <p>
   31    * Note this is really needed since using Introspector.getBeanInfo with a stop
   32    * class is not an option because:
   33    * <ol>
   34    * <li>The API does not define a 3-parameter getBeanInfo in which you can use a
   35    * stop class AND flags. [Why? I guess this is a bug in the spec.]
   36    * <li>java.beans.Introspector is buggy and, opposite to what's stated in the
   37    * Javadocs, only results of getBeanInfo(Class) are actually cached.
   38    * </ol>
   39    * 
   40    * @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a>
   41    * @version $Revision: 1.6 $ updated on $Date: 2005/07/12 20:50:43 $
   42    */
   43   public class TestBeanBeanInfo implements BeanInfo {
   44   
   45   	public BeanInfo[] getAdditionalBeanInfo() {
   46   		return new BeanInfo[0];
   47   	}
   48   
   49   	/*
   50   	 * (non-Javadoc)
   51   	 * 
   52   	 * @see java.beans.BeanInfo#getBeanDescriptor()
   53   	 */
   54   	public BeanDescriptor getBeanDescriptor() {
   55   		return null;
   56   	}
   57   
   58   	/*
   59   	 * (non-Javadoc)
   60   	 * 
   61   	 * @see java.beans.BeanInfo#getDefaultEventIndex()
   62   	 */
   63   	public int getDefaultEventIndex() {
   64   		return 0;
   65   	}
   66   
   67   	/*
   68   	 * (non-Javadoc)
   69   	 * 
   70   	 * @see java.beans.BeanInfo#getDefaultPropertyIndex()
   71   	 */
   72   	public int getDefaultPropertyIndex() {
   73   		return 0;
   74   	}
   75   
   76   	/*
   77   	 * (non-Javadoc)
   78   	 * 
   79   	 * @see java.beans.BeanInfo#getEventSetDescriptors()
   80   	 */
   81   	public EventSetDescriptor[] getEventSetDescriptors() {
   82   		return new EventSetDescriptor[0];
   83   	}
   84   
   85   	/*
   86   	 * (non-Javadoc)
   87   	 * 
   88   	 * @see java.beans.BeanInfo#getIcon(int)
   89   	 */
   90   	public Image getIcon(int iconKind) {
   91   		return null;
   92   	}
   93   
   94   	/*
   95   	 * (non-Javadoc)
   96   	 * 
   97   	 * @see java.beans.BeanInfo#getMethodDescriptors()
   98   	 */
   99   	public MethodDescriptor[] getMethodDescriptors() {
  100   		return new MethodDescriptor[0];
  101   	}
  102   
  103   	/*
  104   	 * (non-Javadoc)
  105   	 * 
  106   	 * @see java.beans.BeanInfo#getPropertyDescriptors()
  107   	 */
  108   	public PropertyDescriptor[] getPropertyDescriptors() {
  109   		return new PropertyDescriptor[0];
  110   	}
  111   }

Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.testbeans » [javadoc | source]