Package wt.visitor
Class TextOutputVisitor
java.lang.Object
wt.visitor.VisitorAdapter
wt.visitor.TextOutputVisitor
- All Implemented Interfaces:
Visitor
The TextOutputVisitor can be used as a base class for Visitor implementations
that are primarily used to produce text output. This class contains
a reference to a PrintWriter for producing text output. Connvenience
methods are also available for localizing text output.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an instance.TextOutputVisitor(OutputStream a_outputStream) Construct an instance.TextOutputVisitor(OutputStream a_outputStream, ResourceBundle a_resourceBundle) Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the attribute: printWriter.Gets the object for the association that plays role: theResourceBundle.voidprintLocalizedMessage(String a_messageKey, Object[] a_params) Prints a message using the message key, parameters, and the instance resource bundle.voidprintLocalizedMessage(ResourceBundle a_resourceBundle, String a_messageKey, Object[] a_params) Prints a message using the message key, parameters, and resource bundle.voidprintLocalizedMessage(LocalizableMessage a_localizedMessage) Prints a message using the locale.voidsetPrintWriter(OutputStream a_outputStream) Sets the PrintWriter instance.voidsetPrintWriter(PrintWriter a_PrintWriter) Sets the value of the attribute: printWriter.voidsetResourceBundle(ResourceBundle a_ResourceBundle) Sets the object for the association that plays role: theResourceBundle.
-
Constructor Details
-
TextOutputVisitor
public TextOutputVisitor(OutputStream a_outputStream, ResourceBundle a_resourceBundle) throws WTPropertyVetoException Construct an instance.
Supported API: true- Parameters:
a_outputStream-a_resourceBundle-- Throws:
WTPropertyVetoException
-
TextOutputVisitor
Construct an instance.
Supported API: true- Parameters:
a_outputStream-- Throws:
WTPropertyVetoException
-
TextOutputVisitor
public TextOutputVisitor()Construct an instance.
Supported API: true
-
-
Method Details
-
getPrintWriter
Gets the value of the attribute: printWriter.
Supported API: true- Returns:
- PrintWriter
-
setPrintWriter
Sets the value of the attribute: printWriter.
Supported API: true- Parameters:
a_PrintWriter-- Throws:
WTPropertyVetoException
-
getResourceBundle
Gets the object for the association that plays role: theResourceBundle.
Supported API: true- Returns:
- ResourceBundle
-
setResourceBundle
Sets the object for the association that plays role: theResourceBundle.
Supported API: true- Parameters:
a_ResourceBundle-- Throws:
WTPropertyVetoException
-
setPrintWriter
Sets the PrintWriter instance.
Supported API: true- Parameters:
a_outputStream-- Throws:
WTPropertyVetoException
-
printLocalizedMessage
Prints a message using the message key, parameters, and the instance resource bundle.
Supported API: true- Parameters:
a_messageKey-a_params-
-
printLocalizedMessage
public void printLocalizedMessage(ResourceBundle a_resourceBundle, String a_messageKey, Object[] a_params) Prints a message using the message key, parameters, and resource bundle.
Supported API: true- Parameters:
a_resourceBundle-a_messageKey-a_params-
-
printLocalizedMessage
Prints a message using the locale.
Supported API: true- Parameters:
a_localizedMessage-
-