Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-962

Load of classes using a standard discovery method across different projects/jars

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 2.2
    • None
    • None

    Description

      Implement a simple but standardized way, for example using Java ServiceLoader (simple to use but with little customizations) to load all classes in CLASSPATH that implements/extends a given class.
      Note that a great feature (of ServiceLoader) is that all manifest files with the given name are loaded, even in different projects or jars (available in classpath); could be useful to simplify integration of customizations/extensions.

      This could be useful for example to discover and load all Components found in CLASSPATH, from the Skin (maybe with a dedicated implementation of loaders).

      Here you can find a sample version of the same concepts, but more general (and for Plugins):
      https://github.com/smartiniOnGitHub/dynamic-loaders

      Some discussion here:
      http://apache-pivot-developers.417237.n3.nabble.com/Loading-of-classes-via-Service-Provider-td4026887.html

      Attachments

        Activity

          People

            smartini Sandro Martini
            smartini Sandro Martini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: