Interface JamService

  • All Known Implementing Classes:
    JamServiceImpl

    public interface JamService

    Encapsulates the a set of java classes which were which met a set of criteria described in a JamServiceParams object. A JamService exposes both a particular set of JClasses, as well as a JamClassLoader which can be used to load related classes.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      JClass[] getAllClasses()
      Returns all of the JClasses returned by getClasses() in a single array.
      JamClassIterator getClasses()
      Returns an iterator of the JClasses named in the array returned by getClassNames().
      JamClassLoader getClassLoader()
      Returns a JamClassLoader which can be used to load JClasses from class- and source-file locations specified in the JamServiceParams with which this service was instantiated.
      java.lang.String[] getClassNames()
      Returns the names of the classes that were described in the JamServiceParams object used to create this service.
    • Method Detail

      • getClassLoader

        JamClassLoader getClassLoader()
        Returns a JamClassLoader which can be used to load JClasses from class- and source-file locations specified in the JamServiceParams with which this service was instantiated. Note that it is possible to use this mechanism to load JClasses that are not returned by getClasses().
      • getClassNames

        java.lang.String[] getClassNames()
        Returns the names of the classes that were described in the JamServiceParams object used to create this service. Note that this list will never change for a given service; though it is possible to use the service's JamClassLoader to load other types, this method will always return the initial set of classes.
      • getClasses

        JamClassIterator getClasses()
        Returns an iterator of the JClasses named in the array returned by getClassNames().
      • getAllClasses

        JClass[] getAllClasses()
        Returns all of the JClasses returned by getClasses() in a single array. Use of this method (as opposed to getClasses()) is not advised if you expect to be dealing with a very large set of classes, as it makes it less likely that JClasses will be garbage collected when no longer needed.