Class 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 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 service
        java.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)