APIdia Launch Partner
Top Description Inners Constructors Methods
com.sun.tools.javac.main

public abstract Class OptionHelper

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.tools.javac.main.OptionHelper.GrumpyHelper
Imports
java.nio.file.Path, com.sun.tools.javac.resources.CompilerProperties.Errors, com.sun.tools.javac.util.JCDiagnostic, .JCDiagnostic.Error, .Log, .Log.PrefixKind

Helper object to be used by Option#process, providing access to the compilation environment.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
OptionHelper.GrumpyHelper

An implementation of OptionHelper that mostly throws exceptions.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
addClassName(String s)

Record the name of a class for annotation processing.

pack-priv abstract void
addFile(Path p)

Record a file to be compiled.

public abstract String

Returns:

the value of the option
get
(Option
the option
option
)

Get the current value of an option.

public abstract Log

Returns:

the log
getLog
()

Get access to the Log for the compilation.

public abstract String

Returns:

the name of the tool
getOwnName
()

Get the name of the tool, such as "javac", to be used in info like -help.

public abstract boolean

Returns:

true if the option was handled successfully, and false otherwise
handleFileManagerOption
(Option
the option
option
,
String
the value for the option
value
)

Handle a file manager option.

public abstract void
initialize()

Initialize this instance, as needed, if not already initialized.

pack-priv Option.InvalidValueException

Returns:

the InvalidValueException
newInvalidValueException
(JCDiagnostic.Error error)

Returns a new InvalidValueException, with a localized detail message.

public abstract void
put(String
the primary name of the option
name
,
String
the value for the option
value
)

Set the value of an option.

public abstract void
remove(String
the primary name of the option
name
)

Remove any prior value for an option.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OptionHelperback to summary
public OptionHelper()

Method Detail

addClassNameback to summary
pack-priv abstract void addClassName(String s)

Record the name of a class for annotation processing.

addFileback to summary
pack-priv abstract void addFile(Path p)

Record a file to be compiled.

getback to summary
public abstract String get(Option option)

Get the current value of an option.

Parameters
option:Option

the option

Returns:String

the value of the option

getLogback to summary
public abstract Log getLog()

Get access to the Log for the compilation.

Returns:Log

the log

getOwnNameback to summary
public abstract String getOwnName()

Get the name of the tool, such as "javac", to be used in info like -help.

Returns:String

the name of the tool

handleFileManagerOptionback to summary
public abstract boolean handleFileManagerOption(Option option, String value)

Handle a file manager option.

Parameters
option:Option

the option

value:String

the value for the option

Returns:boolean

true if the option was handled successfully, and false otherwise

initializeback to summary
public abstract void initialize()

Initialize this instance, as needed, if not already initialized.

newInvalidValueExceptionback to summary
pack-priv Option.InvalidValueException newInvalidValueException(JCDiagnostic.Error error)

Returns a new InvalidValueException, with a localized detail message.

Returns:Option.InvalidValueException

the InvalidValueException

putback to summary
public abstract void put(String name, String value)

Set the value of an option.

Parameters
name:String

the primary name of the option

value:String

the value for the option

removeback to summary
public abstract void remove(String name)

Remove any prior value for an option.

Parameters
name:String

the primary name of the option

com.sun.tools.javac.main back to summary

public Class OptionHelper.GrumpyHelper

extends OptionHelper
Class Inheritance

An implementation of OptionHelper that mostly throws exceptions.

Field Summary

Modifier and TypeField and Description
private final Log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addClassName(String s)

Implements abstract com.sun.tools.javac.main.OptionHelper.addClassName.

Record the name of a class for annotation processing.

public void
addFile(Path p)

Implements abstract com.sun.tools.javac.main.OptionHelper.addFile.

Record a file to be compiled.

public String
get(Option option)

Implements abstract com.sun.tools.javac.main.OptionHelper.get.

Get the current value of an option.

public Log
getLog()

Implements abstract com.sun.tools.javac.main.OptionHelper.getLog.

Get access to the Log for the compilation.

public String
getOwnName()

Implements abstract com.sun.tools.javac.main.OptionHelper.getOwnName.

Get the name of the tool, such as "javac", to be used in info like -help.

public boolean
handleFileManagerOption(Option option, String value)

Implements abstract com.sun.tools.javac.main.OptionHelper.handleFileManagerOption.

Handle a file manager option.

public void
initialize()

Implements abstract com.sun.tools.javac.main.OptionHelper.initialize.

Initialize this instance, as needed, if not already initialized.

public void
put(String name, String value)

Implements abstract com.sun.tools.javac.main.OptionHelper.put.

Set the value of an option.

public void
remove(String name)

Implements abstract com.sun.tools.javac.main.OptionHelper.remove.

Remove any prior value for an option.

Inherited from com.sun.tools.javac.main.OptionHelper:
newInvalidValueException

Field Detail

logback to summary
private final Log log

Constructor Detail

GrumpyHelperback to summary
public GrumpyHelper(Log log)

Method Detail

addClassNameback to summary
public void addClassName(String s)

Implements abstract com.sun.tools.javac.main.OptionHelper.addClassName.

Doc from com.sun.tools.javac.main.OptionHelper.addClassName.

Record the name of a class for annotation processing.

Annotations
@Override
addFileback to summary
public void addFile(Path p)

Implements abstract com.sun.tools.javac.main.OptionHelper.addFile.

Doc from com.sun.tools.javac.main.OptionHelper.addFile.

Record a file to be compiled.

Annotations
@Override
getback to summary
public String get(Option option)

Implements abstract com.sun.tools.javac.main.OptionHelper.get.

Doc from com.sun.tools.javac.main.OptionHelper.get.

Get the current value of an option.

Annotations
@Override
getLogback to summary
public Log getLog()

Implements abstract com.sun.tools.javac.main.OptionHelper.getLog.

Doc from com.sun.tools.javac.main.OptionHelper.getLog.

Get access to the Log for the compilation.

Annotations
@Override
getOwnNameback to summary
public String getOwnName()

Implements abstract com.sun.tools.javac.main.OptionHelper.getOwnName.

Doc from com.sun.tools.javac.main.OptionHelper.getOwnName.

Get the name of the tool, such as "javac", to be used in info like -help.

Annotations
@Override
handleFileManagerOptionback to summary
public boolean handleFileManagerOption(Option option, String value)

Implements abstract com.sun.tools.javac.main.OptionHelper.handleFileManagerOption.

Doc from com.sun.tools.javac.main.OptionHelper.handleFileManagerOption.

Handle a file manager option.

Annotations
@Override
initializeback to summary
public void initialize()

Implements abstract com.sun.tools.javac.main.OptionHelper.initialize.

Doc from com.sun.tools.javac.main.OptionHelper.initialize.

Initialize this instance, as needed, if not already initialized.

Annotations
@Override
putback to summary
public void put(String name, String value)

Implements abstract com.sun.tools.javac.main.OptionHelper.put.

Doc from com.sun.tools.javac.main.OptionHelper.put.

Set the value of an option.

Annotations
@Override
removeback to summary
public void remove(String name)

Implements abstract com.sun.tools.javac.main.OptionHelper.remove.

Doc from com.sun.tools.javac.main.OptionHelper.remove.

Remove any prior value for an option.

Annotations
@Override