Package net.officefloor.compile.classes
Class OfficeFloorClassPathScanner
- java.lang.Object
-
- net.officefloor.compile.classes.OfficeFloorClassPathScanner
-
public class OfficeFloorClassPathScanner extends java.lang.Object
Class
path scanner to aid discovering resources.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description OfficeFloorClassPathScanner(SourceContext context)
Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
scan(java.lang.String packageName)
Scans the package forClass
path entries.java.util.Set<java.lang.String>
scanClasses(java.lang.String packageName)
Scans the package for justClass
fully qualified names.static java.lang.String
translatePackageToPath(java.lang.String packageName)
Convenience method to translates thePackage
name to class path entry path.static java.lang.String
translateResourceUrlToFilePath(java.net.URL resourceUrl)
Translates the resourceURL
to the JAR file path.
-
-
-
Constructor Detail
-
OfficeFloorClassPathScanner
public OfficeFloorClassPathScanner(SourceContext context)
Instantiate.- Parameters:
context
-SourceContext
.
-
-
Method Detail
-
translatePackageToPath
public static java.lang.String translatePackageToPath(java.lang.String packageName)
Convenience method to translates thePackage
name to class path entry path.- Parameters:
packageName
-Package
name.- Returns:
- Class path entry path for
Package
.
-
translateResourceUrlToFilePath
public static java.lang.String translateResourceUrlToFilePath(java.net.URL resourceUrl)
Translates the resourceURL
to the JAR file path.- Parameters:
resourceUrl
- ResourceURL
.- Returns:
File
path.
-
scan
public java.util.Set<java.lang.String> scan(java.lang.String packageName) throws java.io.IOException
Scans the package forClass
path entries.- Parameters:
packageName
- Package name.- Returns:
Class
path entries for the package.- Throws:
java.io.IOException
- If fails to scan theClass
path.
-
scanClasses
public java.util.Set<java.lang.String> scanClasses(java.lang.String packageName) throws java.io.IOException
Scans the package for justClass
fully qualified names.- Parameters:
packageName
- Package name.- Returns:
- Fully qualified
Class
names for the package. - Throws:
java.io.IOException
- If fails to scan theClass
path.
-
-