com.vaadin.server.widgetsetutils.

Class ClassPathExplorer

  • public class ClassPathExplorer
    extends Object

    Utility class to collect widgetset related information from classpath. Utility will seek all directories from classpaths, and jar files having "Vaadin-Widgetsets" key in their manifest file.

    Used by WidgetMapGenerator and ide tools to implement some monkey coding for you.

    Developer notice: If you end up reading this comment, I guess you have faced a sluggish performance of widget compilation or unreliable detection of components in your classpaths. The thing you might be able to do is to use annotation processing tool like apt to generate the needed information. Then either use that information in WidgetMapGenerator or create the appropriate monkey code for gwt directly in annotation processor and get rid of WidgetMapGenerator. Using annotation processor might be a good idea when dropping Java 1.5 support (integrated to javac in 6).

    • Method Detail

      • getAvailableWidgetSetsAndStylesheets

        public static ClassPathExplorer.LocationInfo getAvailableWidgetSetsAndStylesheets()

        Finds the names and locations of widgetsets and themes available on the class path.

        Returns:

      • getDefaultSourceDirectory

        public static URL getDefaultSourceDirectory()

        Find and return the default source directory where to create new widgetsets. Return the first directory (not a JAR file etc.) on the classpath by default. TODO this could be done better...

        Returns:

        URL

      • getWidgetsetSourceDirectory

        public static URL getWidgetsetSourceDirectory​(String widgetsetFileName)

        Find and return the source directory which contains the given widgetset file. If not applicable or widgetsetFileName is null, return the first directory (not a JAR file etc.) on the classpath. TODO this could be done better...

        Parameters:

        widgetsetFileName - relative path for the widgetset

        Returns:

        URL

        Since:

        7.6.5

      • main

        public static void main​(String[] args)

        Test method for helper tool.