Top Constructors Methods
sun.tools.jar

public Class JarToolProvider

extends Object
implements ToolProvider
Class Inheritance
All Implemented Interfaces
java.util.spi.ToolProvider
Imports
java.io.PrintWriter, java.util.Optional, java.util.spi.ToolProvider

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Optional<String>
description()

Overrides default java.util.spi.ToolProvider.description.

Returns a short description of the tool, or an empty Optional if no description is available.

public String
name()

Implements java.util.spi.ToolProvider.name.

Returns the name of this tool provider.

public int
run(PrintWriter
a stream to which "expected" output should be written
out
,
PrintWriter
a stream to which any error messages should be written
err
,
String...
the command-line arguments for the tool
args
)

Implements java.util.spi.ToolProvider.run.

Runs an instance of the tool, returning zero for a successful run.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JarToolProviderback to summary
public JarToolProvider()

Method Detail

descriptionback to summary
public Optional<String> description()

Overrides default java.util.spi.ToolProvider.description.

Doc from java.util.spi.ToolProvider.description.

Returns a short description of the tool, or an empty Optional if no description is available.

Returns:Optional<String>

a short description of the tool, or an empty Optional if no description is available

nameback to summary
public String name()

Implements java.util.spi.ToolProvider.name.

Doc from java.util.spi.ToolProvider.name.

Returns the name of this tool provider.

Returns:String

the name of this tool provider

runback to summary
public int run(PrintWriter out, PrintWriter err, String... args)

Implements java.util.spi.ToolProvider.run.

Doc from java.util.spi.ToolProvider.run.

Runs an instance of the tool, returning zero for a successful run. Any non-zero return value indicates a tool-specific error during the execution. Two streams should be provided, for "expected" output, and for any error messages. If it is not necessary to distinguish the output, the same stream may be used for both.

Parameters
out:PrintWriter

a stream to which "expected" output should be written

err:PrintWriter

a stream to which any error messages should be written

args:String[]

the command-line arguments for the tool

Returns:int

the result of executing the tool. A return value of 0 means the tool did not encounter any errors; any other value indicates that at least one error occurred during execution.