|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.main.Options
public class Options
This object encapsulates various polyglot options.
Field Summary | |
---|---|
boolean |
assertions
|
java.lang.String |
bootclasspath
|
java.lang.String |
classpath
|
java.lang.String |
default_classpath
|
java.util.Set |
disable_passes
Disable the following passes? |
java.util.Set |
dump_ast
Dump the AST after the following passes? |
int |
error_count
|
protected ExtensionInfo |
extension
Back pointer to the extension that owns this options |
boolean |
fully_qualified_names
|
static Options |
global
An annoying hack to allow objects to get their hands on the Options object. |
boolean |
keep_output_files
keep output files |
java.io.File |
output_directory
|
java.lang.String |
output_ext
|
boolean |
output_stdout
|
int |
output_width
|
java.lang.String |
post_compiler
|
java.util.Set |
print_ast
Pretty-print the AST after the following passes? |
boolean |
serialize_type_info
Inject type information in serialized form into output file? |
java.lang.String[] |
source_ext
|
java.util.Collection |
source_path
|
protected int |
USAGE_FLAG_WIDTH
The number of spaces from the left that the descriptions for flags will be displayed. |
protected int |
USAGE_SCREEN_WIDTH
The maximum width of a line when printing usage information. |
protected int |
USAGE_SUBSECTION_INDENT
The number of spaces to indent a subsection of usage information. |
Constructor Summary | |
---|---|
Options(ExtensionInfo extension)
Constructor |
Method Summary | |
---|---|
java.lang.String |
constructFullClasspath()
|
java.lang.String |
constructPostCompilerClasspath()
|
boolean |
cppBackend()
HACK: This method really, for cleanliness, should not exist. |
protected int |
parseCommand(java.lang.String[] args,
int index,
java.util.Set source)
Parse a command |
void |
parseCommandLine(java.lang.String[] args,
java.util.Set source)
Parse the command line |
protected static void |
printSpaces(java.io.PrintStream out,
int n)
Utility method to print a number of spaces to a PrintStream. |
void |
setDefaultValues()
Set default values for options |
void |
usage(java.io.PrintStream out)
Print usage information |
protected void |
usageForFlag(java.io.PrintStream out,
java.lang.String flag,
java.lang.String description)
Output a flag and a description of its usage in a nice format. |
protected void |
usageSubsection(java.io.PrintStream out,
java.lang.String text)
Output a section of text for usage information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Options global
protected ExtensionInfo extension
public int error_count
public java.util.Collection source_path
public java.io.File output_directory
public java.lang.String default_classpath
public java.lang.String classpath
public java.lang.String bootclasspath
public boolean assertions
public java.lang.String[] source_ext
public java.lang.String output_ext
public boolean output_stdout
public java.lang.String post_compiler
public int output_width
public boolean fully_qualified_names
public boolean serialize_type_info
public java.util.Set dump_ast
public java.util.Set print_ast
public java.util.Set disable_passes
public boolean keep_output_files
protected int USAGE_SCREEN_WIDTH
usageForFlag
and usageSubsection
.
protected int USAGE_FLAG_WIDTH
usageForFlag
.
protected int USAGE_SUBSECTION_INDENT
usageSubsection
.
Constructor Detail |
---|
public Options(ExtensionInfo extension)
Method Detail |
---|
public boolean cppBackend()
public void setDefaultValues()
public void parseCommandLine(java.lang.String[] args, java.util.Set source) throws UsageError
UsageError
- if the usage is incorrect.protected int parseCommand(java.lang.String[] args, int index, java.util.Set source) throws UsageError, Main.TerminationException
UsageError
Main.TerminationException
public void usage(java.io.PrintStream out)
protected void usageForFlag(java.io.PrintStream out, java.lang.String flag, java.lang.String description)
out
- output PrintStreamflag
- description
- description of the flag.protected void usageSubsection(java.io.PrintStream out, java.lang.String text)
USAGE_SUBSECTION_INDENT
out
- the output PrintStreamtext
- the text to output.protected static void printSpaces(java.io.PrintStream out, int n)
out
- output PrintStreamn
- number of spaces to print.public java.lang.String constructFullClasspath()
public java.lang.String constructPostCompilerClasspath()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |