summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gilbert <david.gilbert@object-refinery.com>2006-11-24 04:38:18 +0000
committerDavid Gilbert <david.gilbert@object-refinery.com>2006-11-24 04:38:18 +0000
commitacaed0103f09bc35ea26a51169659610d7544962 (patch)
tree1e05ea075c1a21286ae425890587fab1a03a51e8
parentba382cbfedb8dce61812052a16bf555d489592e9 (diff)
downloadclasspath-acaed0103f09bc35ea26a51169659610d7544962.tar.gz
2006-11-24 David Gilbert <david.gilbert@object-refinery.com>
* java/beans/beancontext/BeanContextServicesSupport.java (getChildBeanContextServicesListener): Implemented.
-rw-r--r--ChangeLog5
-rw-r--r--java/beans/beancontext/BeanContextServicesSupport.java17
2 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f0267d9f..d1c7c0bbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}
/**