/** * Layer method, enhanced to check if the PlugIn is interested in being * added to the BeanContext. */ public boolean getAddToBeanContext() { boolean ret = false; if (plugin != null && (plugin instanceof BeanContextChild || plugin instanceof BeanContextMembershipListener)) { if (plugin instanceof AbstractPlugIn) { ret = ((AbstractPlugIn) plugin).getAddToBeanContext(); } else { ret = true; } } else { ret = super.getAddToBeanContext(); } if (Debug.debugging("plugin")) { Debug.output(getName() + ".addToBeanContext is " + ret); } return ret; }
/** * Added because apparently, the BeanContext doesn't check to see if the * object is also a membership listener to remove it from that list. This * method removes the object from that list, too, if it is a * BeanContextMembershipListener. */ public boolean remove(Object obj) { boolean ret = super.remove(obj); if (obj instanceof BeanContextMembershipListener) { super.removeBeanContextMembershipListener((BeanContextMembershipListener) obj); } return ret; }
/** * @see java.beans.beancontext.BeanContextSupport#addBeanContextMembershipListener() */ public Result testAddBeanContextMembershipListenerException() throws Exception { BeanContextMembershipListener bcml = null; try { context.addBeanContextMembershipListener(bcml); } catch (NullPointerException e) { return passed(); } return failed("testAddBeanContextMembershipListenerException"); }
/** * @see java.beans.beancontext.BeanContextSupport#removeBeanContextMembershipListener() */ public Result testRemoveBeanContextMembershipListenerException() throws Exception { BeanContextMembershipListener bcml = null; try { context.removeBeanContextMembershipListener(bcml); } catch (NullPointerException e) { return passed(); } return failed("testRemoveBeanContextMembershipListenerException"); }
public void removeBeanContextMembershipListener( BeanContextMembershipListener p0) { return; }
public void addBeanContextMembershipListener( BeanContextMembershipListener p0) { return; }
public static BeanContextMembershipListener publicGetChildBeanContextMembershipListener( Object child) { return getChildBeanContextMembershipListener(child); }
public void testGetChildBeanContextMembershipListener_NullParam() { BeanContextMembershipListener result = MockBeanContextSupport .publicGetChildBeanContextMembershipListener(null); assertNull(result); }
public void testGetChildBeanContextMembershipListener() { MockBeanContextMembershipListener child = new MockBeanContextMembershipListener(); BeanContextMembershipListener result = MockBeanContextSupport .publicGetChildBeanContextMembershipListener(child); assertSame(child, result); }
public void testGetChildBeanContextMembershipListener_WrongClass() { BeanContextMembershipListener result = MockBeanContextSupport .publicGetChildBeanContextMembershipListener(new Integer(129)); assertNull(result); }
public void addBeanContextMembershipListener(BeanContextMembershipListener arg0) { support.addBeanContextMembershipListener(arg0); }
public void removeBeanContextMembershipListener(BeanContextMembershipListener arg0) { support.removeBeanContextMembershipListener(arg0); }
public void addBeanContextMembershipListener( BeanContextMembershipListener bcml) { // Auto-generated method stub }
public void removeBeanContextMembershipListener( BeanContextMembershipListener bcml) { // Auto-generated method stub }