public interface Printable
print(int, PrintWriter)method is called to print the value of the type.
|Modifier and Type||Field and Description|
This mode indicates the customized print method has been called after the invocation of the default printing routine.
This mode indicates the customized print method has been called before the invocation of the default printing routine.
This result code instructs the
This result code indicates that the value has been printed by the customized print routine and invocation of the default print method for the value is not required.
static final int CONTINUE
DataPrinterto invoke the default print method for the value after return from the customized print routine.
static final int DONE
static final int BEFORE
static final int AFTER
int print(int mode, java.io.PrintWriter s) throws UserPrintFailedException
datavalue. This method is invoked at most twice: before the invocation of the default printing routine (the
modeparameter is set to
BEFOREby the caller) and, optionally, after the default value notation has been printed (the caller sets the
AFTERon this second call). The second invocation does not occur if the first call to the customized print routine returned the
DONEresult code. Extra caution should be taken when the customized print method calls the
AbstractData. Since the
toString()implicitly calls the customized print method, an infinite recursion might occur. It is strongly recommended that the customized print method not print any newline characters, since it can cause havoc to the formatting style.
PrintWriterto print the value.
DONE. The caller ignores the result code when it invokes the customized print method with
modeargument set to
UserPrintFailedException- thrown if the customized method fails.
Copyright © 2017 OSS Nokalva, Inc. All rights reserved.
This document is proprietary to OSS Nokalva, Inc., and may be used only by their direct licensees. Distribution is not permitted. This copyright statement must not be removed.