org.apache.avalon.repository.main
Class AbstractBuilder

java.lang.Object
  extended byorg.apache.avalon.repository.main.AbstractBuilder
Direct Known Subclasses:
DefaultBuilder, DefaultInitialContext

public abstract class AbstractBuilder
extends Object

Application and component bootstrapper used to instantiate, and or invoke Classes and their methods within newly constructed Repository ClassLoaders.

Version:
$Revision: 1.4 $
Author:
Alex Karasulu, Stephen McConnell

Constructor Summary
AbstractBuilder()
           
 
Method Summary
protected  Factory createDelegate(ClassLoader classloader, String factory, InitialContext context)
          Create a factory delegate using a supplied class and command line arguemnts.
protected  Class loadFactoryClass(ClassLoader classloader, String factory)
          Load a factory class using a supplied classloader and factory classname.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBuilder

public AbstractBuilder()
Method Detail

loadFactoryClass

protected Class loadFactoryClass(ClassLoader classloader,
                                 String factory)
                          throws RepositoryException
Load a factory class using a supplied classloader and factory classname.

Parameters:
classloader - the classloader to load the class from
factory - the factory classname
Returns:
the factory class
Throws:
RepositoryException - if a factory class loading error occurs

createDelegate

protected Factory createDelegate(ClassLoader classloader,
                                 String factory,
                                 InitialContext context)
                          throws RepositoryException

Create a factory delegate using a supplied class and command line arguemnts. The implementation will conduct an ordered search for a constructor matching one of the four standard constructor patterns.

Parameters:
classloader - the classloader
factory - the the factory classname
context - the inital repository context
Returns:
the instantiated factory
Throws:
RepositoryException - if a factory creation error occurs


Copyright © Apache Software Foundation. All Rights Reserved.