diff options
author | David Gilbert <david.gilbert@object-refinery.com> | 2006-11-24 04:38:18 +0000 |
---|---|---|
committer | David Gilbert <david.gilbert@object-refinery.com> | 2006-11-24 04:38:18 +0000 |
commit | acaed0103f09bc35ea26a51169659610d7544962 (patch) | |
tree | 1e05ea075c1a21286ae425890587fab1a03a51e8 | |
parent | ba382cbfedb8dce61812052a16bf555d489592e9 (diff) | |
download | classpath-acaed0103f09bc35ea26a51169659610d7544962.tar.gz |
2006-11-24 David Gilbert <david.gilbert@object-refinery.com>
* java/beans/beancontext/BeanContextServicesSupport.java
(getChildBeanContextServicesListener): Implemented.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/beans/beancontext/BeanContextServicesSupport.java | 17 |
2 files changed, 19 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2006-11-24 David Gilbert <david.gilbert@object-refinery.com> + + * java/beans/beancontext/BeanContextServicesSupport.java + (getChildBeanContextServicesListener): Implemented. + 2006-11-23 Roman Kennke <kennke@aicas.com> * gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java diff --git a/java/beans/beancontext/BeanContextServicesSupport.java b/java/beans/beancontext/BeanContextServicesSupport.java index 035a3b25e..ce09b86cc 100644 --- a/java/beans/beancontext/BeanContextServicesSupport.java +++ b/java/beans/beancontext/BeanContextServicesSupport.java @@ -609,11 +609,22 @@ public class BeanContextServicesSupport return (BeanContextServices) beanContextChildPeer; } + /** + * Returns <code>child</code> as an instance of + * {@link BeanContextServicesListener}, or <code>null</code> if + * <code>child</code> does not implement that interface. + * + * @param child the child (<code>null</code> permitted). + * + * @return The child cast to {@link BeanContextServicesListener}. + */ protected static final BeanContextServicesListener - getChildBeanContextServicesListener (Object child) - throws NotImplementedException + getChildBeanContextServicesListener(Object child) { - throw new Error ("Not implemented"); + if (child instanceof BeanContextServicesListener) + return (BeanContextServicesListener) child; + else + return null; } /** |