KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jmeter > testbeans > TestBeanBeanInfo


1 // $Header: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testbeans/TestBeanBeanInfo.java,v 1.5 2004/02/11 18:20:53 jsalvata 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 JavaDoc;
20 import java.beans.BeanDescriptor JavaDoc;
21 import java.beans.BeanInfo JavaDoc;
22 import java.beans.EventSetDescriptor JavaDoc;
23 import java.beans.MethodDescriptor JavaDoc;
24 import java.beans.PropertyDescriptor JavaDoc;
25
26
27 /**
28  * This is the BeanInfo object for the TestBean class. It acts as a "stopper"
29  * for the introspector: we don't want it to look at properties defined at this
30  * or higher classes.
31  * <p>
32  * Note this is really needed since using Introspector.getBeanInfo with a
33  * stop class is not an option because:
34  * <ol>
35  * <li>The API does not define a 3-parameter getBeanInfo in which you can use
36  * a stop class AND flags. [Why? I guess this is a bug in the spec.]
37  * <li>java.beans.Introspector is buggy and, opposite to what's stated in the
38  * Javadocs, only results of getBeanInfo(Class) are actually cached.
39  * </ol>
40  *
41  * @author <a HREF="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a>
42  * @version $Revision: 1.5 $ updated on $Date: 2004/02/11 18:20:53 $
43  */

44 public class TestBeanBeanInfo implements BeanInfo JavaDoc {
45
46
47     public BeanInfo JavaDoc[] getAdditionalBeanInfo() {
48         return new BeanInfo JavaDoc[0];
49     }
50
51     /* (non-Javadoc)
52      * @see java.beans.BeanInfo#getBeanDescriptor()
53      */

54     public BeanDescriptor JavaDoc getBeanDescriptor() {
55         return null;
56     }
57
58     /* (non-Javadoc)
59      * @see java.beans.BeanInfo#getDefaultEventIndex()
60      */

61     public int getDefaultEventIndex() {
62         return 0;
63     }
64
65     /* (non-Javadoc)
66      * @see java.beans.BeanInfo#getDefaultPropertyIndex()
67      */

68     public int getDefaultPropertyIndex() {
69         return 0;
70     }
71
72     /* (non-Javadoc)
73      * @see java.beans.BeanInfo#getEventSetDescriptors()
74      */

75     public EventSetDescriptor JavaDoc[] getEventSetDescriptors() {
76         return new EventSetDescriptor JavaDoc[0];
77     }
78
79     /* (non-Javadoc)
80      * @see java.beans.BeanInfo#getIcon(int)
81      */

82     public Image JavaDoc getIcon(int iconKind) {
83         return null;
84     }
85
86     /* (non-Javadoc)
87      * @see java.beans.BeanInfo#getMethodDescriptors()
88      */

89     public MethodDescriptor JavaDoc[] getMethodDescriptors() {
90         return new MethodDescriptor JavaDoc[0];
91     }
92
93     /* (non-Javadoc)
94      * @see java.beans.BeanInfo#getPropertyDescriptors()
95      */

96     public PropertyDescriptor JavaDoc[] getPropertyDescriptors() {
97         return new PropertyDescriptor JavaDoc[0];
98     }
99 }
Popular Tags