Package org.apache.xmlbeans.impl.jam
Class JamServiceFactory
- java.lang.Object
-
- org.apache.xmlbeans.impl.jam.JamServiceFactory
-
- Direct Known Subclasses:
JamServiceFactoryImpl
public abstract class JamServiceFactory extends java.lang.Object
Start here! This is the normal entry point into the JAM subsystem. JamServiceFactory is a singleton factory which can create a new JamServiceParams and JServices. Here is a code sample that demonstrates how to use JamServiceFactory.// Get the factory singleton JamServiceFactory factory = JamServiceFactory.getInstance(); // Use the factory to create an object that we can use to specify what // java types we want to view JamServiceParams params = factory.createServiceParams(); // Include the classes under mypackage params.includeSources(new File("c:/myproject/src","mypackage/*.java")); // Create a JamService, which will contain JClasses for the classes found in mypackage JamService service = factory.createServiceRoot(params);
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract JamClassLoader
createJamClassLoader(java.lang.ClassLoader cl)
Returns a new JamClassLoader which simply wraps the given classloader.abstract JamService
createService(JamServiceParams params)
Create a new JamService from the given parameters.abstract JamServiceParams
createServiceParams()
Create a new JamServiceParams instance.abstract JamClassLoader
createSystemJamClassLoader()
Returns a new JamClassLoader which simply wraps the system classloader.static JamServiceFactory
getInstance()
Return the default factory singleton for this VM.static void
main(java.lang.String[] args)
-
-
-
Method Detail
-
getInstance
public static JamServiceFactory getInstance()
Return the default factory singleton for this VM.
-
createServiceParams
public abstract JamServiceParams createServiceParams()
Create a new JamServiceParams instance. The params can be populated and then given to the createServiceRoot method to create a new JamService.
-
createService
public abstract JamService createService(JamServiceParams params) throws java.io.IOException
Create a new JamService from the given parameters.- Throws:
java.io.IOException
- if an IO error occurred while creating the servicejava.lang.IllegalArgumentException
- if the params is null or not an instance returned by createServiceParams().
-
createSystemJamClassLoader
public abstract JamClassLoader createSystemJamClassLoader()
Returns a new JamClassLoader which simply wraps the system classloader.
-
createJamClassLoader
public abstract JamClassLoader createJamClassLoader(java.lang.ClassLoader cl)
Returns a new JamClassLoader which simply wraps the given classloader.
-
main
public static void main(java.lang.String[] args)
-
-