Package org.moeaframework.builder
Class BuildProblem
java.lang.Object
org.moeaframework.util.CommandLineUtility
org.moeaframework.builder.BuildProblem
Command line tool for creating new natively-compiled problems. This tool will create a folder containing all the
files needed to write and compile the problem, package everything into a JAR, and display instructions for using
the generated files.
To define a new language:
- Create a nested package with the name of the language.
- Create a Manifest file with lines formatted as
<sourceFile> -> <destinationFile>
. This controls how the files are extracted into the destination folder. - Create the individual files, typically with the extension
.template
to prevent compilation errors. These files can use${key}
string substitutions. - Add the name of the language to
LANGUAGES
.
-
Field Summary
Modifier and TypeFieldDescriptionExperimental languages.The supported language options.static final String
The variable used in Makefiles specifying the platform-specific classpath separator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.cli.Options
Returns the options made available by this command line utility.static void
Starts this command line utility.void
run
(org.apache.commons.cli.CommandLine commandLine) Runs this command line utility with the specified command line arguments.Methods inherited from class org.moeaframework.util.CommandLineUtility
getCommandString, getLocalizedOptions, setCommandString, showHelp, start
-
Field Details
-
LANGUAGES
The supported language options. -
EXPERIMENTAL
Experimental languages. These are not officially supported as we typically can't fully test end-to-end. -
PATH_SEPARATOR
The variable used in Makefiles specifying the platform-specific classpath separator.- See Also:
-
-
Constructor Details
-
BuildProblem
public BuildProblem()Creates a new instance of this command line tool.
-
-
Method Details
-
getOptions
public org.apache.commons.cli.Options getOptions()Description copied from class:CommandLineUtility
Returns the options made available by this command line utility. The base implementation automatically provides the-h,--help
option. Implementations overriding this method and begin with a call tosuper.getOptions()
.- Overrides:
getOptions
in classCommandLineUtility
- Returns:
- the options made available by this command line utility
-
run
Description copied from class:CommandLineUtility
Runs this command line utility with the specified command line arguments.- Specified by:
run
in classCommandLineUtility
- Parameters:
commandLine
- the command line arguments- Throws:
Exception
- if any exception occurred while running this command
-
main
Starts this command line utility.- Parameters:
args
- the command line arguments- Throws:
Exception
- if an error occurred
-