FileDocCategorySizeDatePackage
BeanDescriptor.javaAPI DocJava SE 5 API2419Fri Aug 26 14:56:56 BST 2005java.beans

BeanDescriptor

public class BeanDescriptor extends FeatureDescriptor
A BeanDescriptor provides global information about a "bean", including its Java class, its displayName, etc.

This is one of the kinds of descriptor returned by a BeanInfo object, which also returns descriptors for properties, method, and events.

Fields Summary
private Reference
beanClassRef
private Reference
customizerClassRef
Constructors Summary
public BeanDescriptor(Class beanClass)
Create a BeanDescriptor for a bean that doesn't have a customizer.

param
beanClass The Class object of the Java class that implements the bean. For example sun.beans.OurButton.class.

	this(beanClass, null);
    
public BeanDescriptor(Class beanClass, Class customizerClass)
Create a BeanDescriptor for a bean that has a customizer.

param
beanClass The Class object of the Java class that implements the bean. For example sun.beans.OurButton.class.
param
customizerClass The Class object of the Java class that implements the bean's Customizer. For example sun.beans.OurButtonCustomizer.class.

	beanClassRef = createReference(beanClass);
	customizerClassRef = createReference(customizerClass);

	String name = beanClass.getName();
	while (name.indexOf('.") >= 0) {
	    name = name.substring(name.indexOf('.")+1);
	}
	setName(name);
    
BeanDescriptor(BeanDescriptor old)

	super(old);
	beanClassRef = old.beanClassRef;
	customizerClassRef = old.customizerClassRef;
    
Methods Summary
public java.lang.ClassgetBeanClass()
Gets the bean's Class object.

return
The Class object for the bean.

	return (Class)getObject(beanClassRef);
    
public java.lang.ClassgetCustomizerClass()
Gets the Class object for the bean's customizer.

return
The Class object for the bean's customizer. This may be null if the bean doesn't have a customizer.

	return (Class)getObject(customizerClassRef);