summaryrefslogtreecommitdiff
path: root/java/beans
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2004-03-08 23:15:49 +0000
committerMark Wielaard <mark@klomp.org>2004-03-08 23:15:49 +0000
commit859d40427509032d772b5cd859136654f355ee6a (patch)
tree80d77530af8f26c6a9cd317ce02d71f0ce64fffd /java/beans
parentcb437f91bcbe75a66b48d4dfa334280d8447cb1e (diff)
downloadclasspath-859d40427509032d772b5cd859136654f355ee6a.tar.gz
* libraries/javalib/java/beans/BeanDescriptor.java
(BeanDescriptor): Set the FeatureDescriptor programmatic name.
Diffstat (limited to 'java/beans')
-rw-r--r--java/beans/BeanDescriptor.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/beans/BeanDescriptor.java b/java/beans/BeanDescriptor.java
index 84a7921f6..ac0f4feee 100644
--- a/java/beans/BeanDescriptor.java
+++ b/java/beans/BeanDescriptor.java
@@ -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. **/