Java 类java.beans.beancontext.BeanContextMembershipListener 实例源码

项目:passage    文件:PlugInLayer.java   
/**
 * 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;
}
项目:passage    文件:MapHandler.java   
/**
 * 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;
}
项目:freeVM    文件:TestBeanContextSupportException.java   
/**
 * @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");
}
项目:freeVM    文件:TestBeanContextSupportException.java   
/**
 * @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");
}
项目:cn1    文件:BeanContextServiceRevokedEventTest.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:cn1    文件:BeanContextServiceRevokedEventTest.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:cn1    文件:BeanContextServiceRevokedEventTest.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:cn1    文件:BeanContextServiceRevokedEventTest.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:cn1    文件:BeanContextSupportTest.java   
public static BeanContextMembershipListener publicGetChildBeanContextMembershipListener(
        Object child) {
    return getChildBeanContextMembershipListener(child);
}
项目:cn1    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener_NullParam() {
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(null);
    assertNull(result);
}
项目:cn1    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener() {
    MockBeanContextMembershipListener child = new MockBeanContextMembershipListener();
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(child);
    assertSame(child, result);
}
项目:cn1    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener_WrongClass() {
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(new Integer(129));
    assertNull(result);
}
项目:cn1    文件:MockBeanContextDelegateS.java   
public void addBeanContextMembershipListener(BeanContextMembershipListener arg0) {
    support.addBeanContextMembershipListener(arg0);
}
项目:cn1    文件:MockBeanContextDelegateS.java   
public void removeBeanContextMembershipListener(BeanContextMembershipListener arg0) {
    support.removeBeanContextMembershipListener(arg0);
}
项目:cn1    文件:MockBeanContext.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:cn1    文件:MockBeanContext.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:cn1    文件:MockBeanContextServices.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:cn1    文件:MockBeanContextServices.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:freeVM    文件:BeanContextSupportTest.java   
public static BeanContextMembershipListener publicGetChildBeanContextMembershipListener(
        Object child) {
    return getChildBeanContextMembershipListener(child);
}
项目:freeVM    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener_NullParam() {
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(null);
    assertNull(result);
}
项目:freeVM    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener() {
    MockBeanContextMembershipListener child = new MockBeanContextMembershipListener();
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(child);
    assertSame(child, result);
}
项目:freeVM    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener_WrongClass() {
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(new Integer(129));
    assertNull(result);
}
项目:freeVM    文件:MockBeanContextDelegateS.java   
public void addBeanContextMembershipListener(BeanContextMembershipListener arg0) {
    support.addBeanContextMembershipListener(arg0);
}
项目:freeVM    文件:MockBeanContextDelegateS.java   
public void removeBeanContextMembershipListener(BeanContextMembershipListener arg0) {
    support.removeBeanContextMembershipListener(arg0);
}
项目:freeVM    文件:MockBeanContext.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:freeVM    文件:MockBeanContext.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:freeVM    文件:MockBeanContextServices.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:freeVM    文件:MockBeanContextServices.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:freeVM    文件:BeanContextServiceRevokedEventTest.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:freeVM    文件:BeanContextServiceRevokedEventTest.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:freeVM    文件:BeanContextServiceRevokedEventTest.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:freeVM    文件:BeanContextServiceRevokedEventTest.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener p0) {
    return;
}
项目:freeVM    文件:BeanContextSupportTest.java   
public static BeanContextMembershipListener publicGetChildBeanContextMembershipListener(
        Object child) {
    return getChildBeanContextMembershipListener(child);
}
项目:freeVM    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener_NullParam() {
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(null);
    assertNull(result);
}
项目:freeVM    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener() {
    MockBeanContextMembershipListener child = new MockBeanContextMembershipListener();
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(child);
    assertSame(child, result);
}
项目:freeVM    文件:BeanContextSupportTest.java   
public void testGetChildBeanContextMembershipListener_WrongClass() {
    BeanContextMembershipListener result = MockBeanContextSupport
            .publicGetChildBeanContextMembershipListener(new Integer(129));
    assertNull(result);
}
项目:freeVM    文件:MockBeanContextDelegateS.java   
public void addBeanContextMembershipListener(BeanContextMembershipListener arg0) {
    support.addBeanContextMembershipListener(arg0);
}
项目:freeVM    文件:MockBeanContextDelegateS.java   
public void removeBeanContextMembershipListener(BeanContextMembershipListener arg0) {
    support.removeBeanContextMembershipListener(arg0);
}
项目:freeVM    文件:MockBeanContext.java   
public void addBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}
项目:freeVM    文件:MockBeanContext.java   
public void removeBeanContextMembershipListener(
        BeanContextMembershipListener bcml) {
    // Auto-generated method stub

}