org.codehaus.jam.provider
Class JamServiceFactoryImpl

java.lang.Object
  extended by org.codehaus.jam.JamServiceFactory
      extended by org.codehaus.jam.provider.JamServiceFactoryImpl

public class JamServiceFactoryImpl
extends JamServiceFactory

Default implementation of the JamServiceFactory singleton. Custom JAM providers need to extend this class and override whatever methods they need to.

Author:
Patrick Calahan <email: pcal-at-bea-dot-com>

Field Summary
static java.lang.String USE_NEW_PARSER
          Service context property which turns on the javadoc killer.
 
Constructor Summary
JamServiceFactoryImpl()
           
 
Method Summary
protected  JamClassBuilder createBuilder(JamServiceContext ctx)
          Creates the JamClassBuilder for the given context.
protected  JamClassBuilder createClassfileBuilder(JamServiceContext jp)
          Creates the class-based classbuilder for the given context.
protected  JamClassLoader createClassLoader(JamServiceContext ctx)
          Creates the main classloader to be used given the input ctx.
 JamClassLoader createJamClassLoader(java.lang.ClassLoader cl)
          Returns a new JamClassLoader which simply wraps the given classloader.
 JamService createService(JamServiceParams jsps)
          Create a new JamService from the given parameters.
 JamServiceParams createServiceParams()
          Create a new JamServiceParams instance.
protected  JamClassBuilder createSourceBuilder(JamServiceContext ctx)
          Creates the source-based classbuilder for the given context.
 JamClassLoader createSystemJamClassLoader()
          Returns a new JamClassLoader which simply wraps the system classloader.
protected  java.lang.String[] getSpecifiedClasses(JamServiceContext params)
          Returns the set of classes to be included in a JamService to be created by the given params.
 
Methods inherited from class org.codehaus.jam.JamServiceFactory
getInstance, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_NEW_PARSER

public static final java.lang.String USE_NEW_PARSER

Service context property which turns on the javadoc killer. This will be removed when javadoc has been phased out.

See Also:
Constant Field Values
Constructor Detail

JamServiceFactoryImpl

public JamServiceFactoryImpl()
Method Detail

createServiceParams

public JamServiceParams createServiceParams()
Description copied from class: JamServiceFactory
Create a new JamServiceParams instance. The params can be populated and then given to the createServiceRoot method to create a new JamService.

Specified by:
createServiceParams in class JamServiceFactory

createService

public JamService createService(JamServiceParams jsps)
                         throws java.io.IOException
Description copied from class: JamServiceFactory
Create a new JamService from the given parameters.

Specified by:
createService in class JamServiceFactory
Throws:
java.io.IOException - if an IO error occurred while creating the service

createSystemJamClassLoader

public JamClassLoader createSystemJamClassLoader()
Description copied from class: JamServiceFactory

Returns a new JamClassLoader which simply wraps the system classloader.

Specified by:
createSystemJamClassLoader in class JamServiceFactory

createJamClassLoader

public JamClassLoader createJamClassLoader(java.lang.ClassLoader cl)
Description copied from class: JamServiceFactory

Returns a new JamClassLoader which simply wraps the given classloader.

Specified by:
createJamClassLoader in class JamServiceFactory

getSpecifiedClasses

protected java.lang.String[] getSpecifiedClasses(JamServiceContext params)
                                          throws java.io.IOException

Returns the set of classes to be included in a JamService to be created by the given params. You should not override this unless you really know what you're doing.

Throws:
java.io.IOException

createClassLoader

protected JamClassLoader createClassLoader(JamServiceContext ctx)
                                    throws java.io.IOException

Creates the main classloader to be used given the input ctx. This is usually a composite of the source classloader and a classfile classloader. Subclasses may override to change the behavior.

Throws:
java.io.IOException

createBuilder

protected JamClassBuilder createBuilder(JamServiceContext ctx)
                                 throws java.io.IOException

Creates the JamClassBuilder for the given context. This will be a composite that may include custom source and class-based classbuilders. It usually includes the system classbuilders and always contains the builtin classbuilder.

Throws:
java.io.IOException

createSourceBuilder

protected JamClassBuilder createSourceBuilder(JamServiceContext ctx)
                                       throws java.io.IOException

Creates the source-based classbuilder for the given context. If no source files or paths are specified in the context, just returns null.

Throws:
java.io.IOException

createClassfileBuilder

protected JamClassBuilder createClassfileBuilder(JamServiceContext jp)
                                          throws java.io.IOException

Creates the class-based classbuilder for the given context. If no class files or classloaders are specified in the params, just returns null.

Throws:
java.io.IOException