Package com.vaadin.integration.maven
Class ClassPathExplorer
- java.lang.Object
-
- com.vaadin.integration.maven.ClassPathExplorer
-
public class ClassPathExplorer extends java.lang.ObjectUtility 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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClassPathExplorer.LocationInfoContains information about widgetsets and themes found on the classpath
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.net.URL>getAvailableWidgetSets(java.util.Map<java.lang.String,java.net.URL> classpathLocations)Finds the names and locations of widgetsets available on the class path.static ClassPathExplorer.LocationInfogetAvailableWidgetSetsAndStylesheets(java.util.Map<java.lang.String,java.net.URL> classpathLocations)Finds the names and locations of widgetsets and themes available on the class path.static java.net.URLgetDefaultSourceDirectory(java.util.List<java.lang.String> classpathEntries)Find and return the default source directory where to create new widgetsets.
-
-
-
Method Detail
-
getAvailableWidgetSets
public static java.util.Map<java.lang.String,java.net.URL> getAvailableWidgetSets(java.util.Map<java.lang.String,java.net.URL> classpathLocations)
Finds the names and locations of widgetsets available on the class path.- Parameters:
classpathLocations-- Returns:
- map from widgetset classname to widgetset location URL
-
getAvailableWidgetSetsAndStylesheets
public static ClassPathExplorer.LocationInfo getAvailableWidgetSetsAndStylesheets(java.util.Map<java.lang.String,java.net.URL> classpathLocations)
Finds the names and locations of widgetsets and themes available on the class path.- Parameters:
classpathLocations-- Returns:
-
getDefaultSourceDirectory
public static java.net.URL getDefaultSourceDirectory(java.util.List<java.lang.String> classpathEntries)
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...- Parameters:
classpathEntries-- Returns:
- URL
-
-