public class Jar2Lib extends Object
Constructor and Description |
---|
Jar2Lib() |
Modifier and Type | Method and Description |
---|---|
void |
copySourceFiles()
Copies any extra C++ source files into the project directory.
|
protected void |
die(String message) |
void |
execute()
Generates a C++ wrapper project based on the current settings.
|
static String |
findEnclosingJar(Class<?> c)
Finds the JAR file (or file system path)
from which the given class was loaded.
|
void |
fixConflicts()
Post-processes the generated proxies to correct any
conflicts identified in the specified conflicts file.
|
void |
fixLibraryPaths()
Converts "\\" to "/" in all library paths, making them platform safe for CMakeLists.txt files
|
void |
generateHeaders()
Generates one header per input Java library.
|
void |
generateProxies()
Generates the C++ proxy classes enumerated in the C++ headers.
|
void |
generateSkeleton()
Copies static project resources into the project directory.
|
List<String> |
getClasspathJars() |
String |
getConflictsPath() |
String |
getCorePath() |
String |
getExtrasPath() |
String |
getHeaderPath() |
List<String> |
getLibraryJars() |
String |
getOutputPath() |
String |
getProjectId() |
String |
getProjectName() |
String |
getSourcePath() |
protected void |
log(String message) |
static void |
main(String[] args) |
void |
parseArgs(String[] args)
Parses the settings from the given command line arguments.
|
void |
setClasspathJars(List<String> classpathJars) |
void |
setConflictsPath(String conflictsPath) |
void |
setCorePath(String corePath) |
void |
setExtrasPath(String extrasPath) |
void |
setHeaderPath(String headerPath) |
void |
setLibraryJars(List<String> libraryJars) |
void |
setOutputPath(String outputPath) |
void |
setProjectId(String projectId) |
void |
setProjectName(String projectName) |
void |
setSourcePath(String sourcePath) |
void |
validateInputs()
Checks that the current settings for project production are valid.
|
public String getProjectId()
public void setProjectId(String projectId)
public String getProjectName()
public void setProjectName(String projectName)
public String getConflictsPath()
public void setConflictsPath(String conflictsPath)
public String getHeaderPath()
public void setHeaderPath(String headerPath)
public String getSourcePath()
public void setSourcePath(String sourcePath)
public String getOutputPath()
public void setOutputPath(String outputPath)
public String getExtrasPath()
public void setExtrasPath(String extrasPath)
public String getCorePath()
public void setCorePath(String corePath)
public void parseArgs(String[] args)
public void execute() throws IOException, VelocityException
IOException
VelocityException
public void fixLibraryPaths()
public void validateInputs()
IllegalStateException
- if the settings are invalid.public void generateHeaders() throws IOException, VelocityException
IOException
VelocityException
public void generateSkeleton() throws IOException
IOException
public void copySourceFiles() throws IOException
IOException
public void generateProxies() throws UnsupportedEncodingException
UnsupportedEncodingException
public void fixConflicts() throws IOException
IOException
protected void log(String message)
protected void die(String message)
public static String findEnclosingJar(Class<?> c) throws UnsupportedEncodingException
UnsupportedEncodingException
Copyright © 2015–2022 SciJava. All rights reserved.