BeanDescriptor.java (BeanDescriptor): Set the FeatureDescriptor programmatic name.
2004-03-11 Mark Wielaard <mark@klomp.org> * java/beans/BeanDescriptor.java (BeanDescriptor): Set the FeatureDescriptor programmatic name. From-SVN: r79324
This commit is contained in:
parent
254ea4774b
commit
877fb3cb41
2 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/* java.beans.BeanDescriptor
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -67,6 +67,14 @@ public class BeanDescriptor extends FeatureDescriptor {
|
|||
public BeanDescriptor(Class beanClass, Class customizerClass) {
|
||||
this.beanClass = beanClass;
|
||||
this.customizerClass = customizerClass;
|
||||
|
||||
// Set the FeatureDescriptor programmatic name.
|
||||
String name = beanClass.getName();
|
||||
int lastInd = name.lastIndexOf('.');
|
||||
if (lastInd != -1)
|
||||
name = name.substring(lastInd + 1);
|
||||
|
||||
setName(name);
|
||||
}
|
||||
|
||||
/** Get the Bean's class. **/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue