2362N/A * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The BeanContext acts a logical hierarchical container for JavaBeans. 0N/A * @author Laurence P. G. Cable 0N/A * @see java.beans.Beans 0N/A * @see java.beans.beancontext.BeanContextChild 0N/A * @see java.beans.beancontext.BeanContextMembershipListener 0N/A * @see java.beans.PropertyChangeEvent 0N/A * @see java.beans.DesignMode 0N/A * @see java.beans.Visibility 0N/A * @see java.util.Collection 0N/A * Instantiate the javaBean named as a 0N/A * child of this <code>BeanContext</code>. 0N/A * The implementation of the JavaBean is 0N/A * derived from the value of the beanName parameter, 0N/A * and is defined by the 0N/A * <code>java.beans.Beans.instantiate()</code> method. 0N/A * @param beanName The name of the JavaBean to instantiate 0N/A * as a child of this <code>BeanContext</code> 0N/A * @throws <code>IOException</code> 0N/A * @throws <code>ClassNotFoundException</code> if the class identified 0N/A * by the beanName parameter is not found 0N/A * Analagous to <code>java.lang.ClassLoader.getResourceAsStream()</code>, 0N/A * this method allows a <code>BeanContext</code> implementation 0N/A * to interpose behavior between the child <code>Component</code> 0N/A * and underlying <code>ClassLoader</code>. 0N/A * @param name the resource name 0N/A * @param bcc the specified child 0N/A * @return an <code>InputStream</code> for reading the resource, 0N/A * or <code>null</code> if the resource could not 0N/A * @throws <code>IllegalArgumentException</code> if 0N/A * the resource is not valid 0N/A * Analagous to <code>java.lang.ClassLoader.getResource()</code>, this 0N/A * method allows a <code>BeanContext</code> implementation to interpose 0N/A * behavior between the child <code>Component</code> 0N/A * and underlying <code>ClassLoader</code>. 0N/A * @param name the resource name 0N/A * @param bcc the specified child 0N/A * @return a <code>URL</code> for the named 0N/A * resource for the specified child 0N/A * @throws <code>IllegalArgumentException</code> 0N/A * if the resource is not valid 0N/A * Adds the specified <code>BeanContextMembershipListener</code> 0N/A * to receive <code>BeanContextMembershipEvents</code> from 0N/A * this <code>BeanContext</code> whenever it adds 0N/A * or removes a child <code>Component</code>(s). 0N/A * @param bcml the <code>BeanContextMembershipListener</code> to be added 0N/A * Removes the specified <code>BeanContextMembershipListener</code> 0N/A * so that it no longer receives <code>BeanContextMembershipEvent</code>s 0N/A * when the child <code>Component</code>(s) are added or removed. 0N/A * @param bcml the <code>BeanContextMembershipListener</code> 0N/A * This global lock is used by both <code>BeanContext</code> 0N/A * and <code>BeanContextServices</code> implementors 0N/A * to serialize changes in a <code>BeanContext</code> 0N/A * hierarchy and any service requests etc.