core/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java
/**
     * Adds a sub-component to this component.  If the sub-component implements
     * {@link VfsComponent}, it is initialised.  All sub-components are closed
     * when this component is closed.
     */
Adds a sub-component to this component.  If the sub-component implements
VfsComponent, it is initialised.  All sub-components are closed
when this component is closed.
Adds a sub - component to this component . If the sub - component implements VfsComponent it is initialised . All sub - components are closed when this component is closed .
protected void addComponent(final Object component)
        throws FileSystemException
    {
        if (!components.contains(component))
        {
            if (component instanceof VfsComponent)
            {
                VfsComponent vfsComponent = (VfsComponent) component;
                vfsComponent.setLogger(getLogger());
                vfsComponent.setContext(getContext());
                vfsComponent.init();
            }
            components.add(component);
        }
    }
protected void addComponent ( final Object component ) throws FileSystemException { if ( ! components . contains ( component ) ) { if ( component instanceof VfsComponent ) { VfsComponent vfsComponent = ( VfsComponent ) component ; vfsComponent . setLogger ( getLogger ( ) ) ; vfsComponent . setContext ( getContext ( ) ) ; vfsComponent . init ( ) ; } components . add ( component ) ; } }
Adds a sub-component to this component.
Adds a sub - component to this component .
// Initialise // Keep track of component, to close it later