public abstract class JavaFileUtil extends Object
Modifier and Type | Field and Description |
---|---|
static TracingOption |
CLASS_PATH |
static String |
TEST_BIN_FOLDER_NAME
When running maven/tycho tests locally a bin folder may leave helpful content hiding what will fail
in a clean workspace.
|
static String |
TEST_SRC_FOLDER_NAME |
Constructor and Description |
---|
JavaFileUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
compileClass(String sourcePath,
String javaCodeSource,
String objectPath,
List<String> classpathProjects) |
static String |
compileClasses(List<JavaFileObject> compilationUnits,
String sourcePath,
String objectPath,
List<String> classpathProjects)
Returns a non-null string describing any problems, null if all ok.
|
static String |
compileClasses(String sourcePath,
String objectPath,
List<String> classpathProjects)
Compile all *.java files on sourcePath to objectPath.
|
static String |
createClassPath(List<String> projectPaths)
Return a javac -cp argument using the system path.separator for each of the projectPaths.
|
static List<String> |
createClassPathProjectList(URIConverter uriConverter,
List<String> projectNames) |
static void |
deleteJavaFiles(String sourcePath)
Compile all *.java files on sourcePath
|
static List<String> |
gatherPackageNames(File binFolder,
String packagePath) |
static List<JavaFileObject> |
getCompilationUnits(File srcFile) |
static File |
getProjectBinFolder(URIConverter uriConverter,
String projectName)
Return the file system folder suitable for use as a javac classpath entry.
|
public static final TracingOption CLASS_PATH
public static final String TEST_BIN_FOLDER_NAME
public static final String TEST_SRC_FOLDER_NAME
public static String compileClass(String sourcePath, String javaCodeSource, String objectPath, List<String> classpathProjects) throws IOException
IOException
public static String compileClasses(String sourcePath, String objectPath, List<String> classpathProjects) throws IOException
IOException
public static String compileClasses(List<JavaFileObject> compilationUnits, String sourcePath, String objectPath, List<String> classpathProjects)
public static String createClassPath(List<String> projectPaths)
public static List<String> createClassPathProjectList(URIConverter uriConverter, List<String> projectNames)
public static void deleteJavaFiles(String sourcePath)
public static List<String> gatherPackageNames(File binFolder, String packagePath)
public static List<JavaFileObject> getCompilationUnits(File srcFile) throws Exception
Exception
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.