diff options
author | Mark Wielaard <mark@klomp.org> | 2004-03-08 23:15:49 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2004-03-08 23:15:49 +0000 |
commit | 859d40427509032d772b5cd859136654f355ee6a (patch) | |
tree | 80d77530af8f26c6a9cd317ce02d71f0ce64fffd /java/beans | |
parent | cb437f91bcbe75a66b48d4dfa334280d8447cb1e (diff) | |
download | classpath-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.java | 10 |
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. **/ |