summaryrefslogtreecommitdiff
path: root/java/beans/beancontext/BeanContextServicesSupport.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/beans/beancontext/BeanContextServicesSupport.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;
}
/**