Class NamedToolOutput
java.lang.Object
org.openjdk.asmtools.common.outputs.NamedToolOutput
- All Implemented Interfaces:
ToolOutput
- Direct Known Subclasses:
ByteOutput, FSOutput, PrintWriterOutput, TextOutput
Historically, the output loggers for compilers had two stderrs, one to stdout and second to stderr.
That should be removed, in favour of just dual stream tool output, printing output to stdout and log into stderr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringIf the output is a file, then the destinationFileName is used to form the filename of the output.private Environmentprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinishClass(String fullyQualifiedName) abstract StringgetName()setDestinationFileName(String destinationFileName) voidstartClass(String fullyQualifiedName, Optional<String> suffix, Environment logger) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ToolOutput
flush, getDataOutputStream, isReady, printlns, prints, prints
-
Field Details
-
fullyQualifiedName
-
destinationFileName
If the output is a file, then the destinationFileName is used to form the filename of the output. 1. File FILENAME or class file CLASSNAME takes the highest priority. This filename cannot be overridden. 2. Public class CLASSNAME { }– class name is CLASSNAME, and this CLASSNAME will be used to generate the filename (i.e., CLASSNAME.class). 3. this_class – The filename will be CLASSNAME.class, but the class name will be this_class.Also, if the -f option is used and the number of processed class files is more than 1, then destinationFileName will only apply to the first input file only. For example, if you run jdis -w . -f FILE input.class input2.class, then in the output directory, the files FILE.jasm and input2.jasm will be generated.
-
suffix
-
environment
-
-
Constructor Details
-
NamedToolOutput
public NamedToolOutput()
-
-
Method Details
-
getCurrentClassName
- Specified by:
getCurrentClassNamein interfaceToolOutput
-
startClass
public void startClass(String fullyQualifiedName, Optional<String> suffix, Environment logger) throws IOException - Specified by:
startClassin interfaceToolOutput- Throws:
IOException
-
finishClass
- Specified by:
finishClassin interfaceToolOutput- Throws:
IOException
-
getDestinationFileName
-
setDestinationFileName
-
getName
-