summaryrefslogtreecommitdiff
path: root/java
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 /java
parentba382cbfedb8dce61812052a16bf555d489592e9 (diff)
downloadclasspath-acaed0103f09bc35ea26a51169659610d7544962.tar.gz
2006-11-24 David Gilbert <david.gilbert@object-refinery.com>
* java/beans/beancontext/BeanContextServicesSupport.java (getChildBeanContextServicesListener): Implemented.
Diffstat (limited to 'java')
-rw-r--r--java/beans/beancontext/BeanContextServicesSupport.java17
1 files changed, 14 insertions, 3 deletions
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;
}
/**