|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectWriter
FilterWriter
ParameterWriter
public class ParameterWriter
Format parameter descriptors or parameter values in a tabular format. This writer assumes a monospaced font and an encoding capable to provide drawing box characters (e.g. unicode).
Field Summary |
---|
Fields inherited from class FilterWriter |
---|
out |
Fields inherited from class Writer |
---|
lock |
Constructor Summary | |
---|---|
ParameterWriter()
Creates a new formatter writting parameters to the default output stream. |
|
ParameterWriter(Writer out)
Creates a new formatter writting parameters to the specified output stream. |
Method Summary | |
---|---|
void |
format(OperationMethod operation)
Prints the elements of an operation to the output stream. |
void |
format(ParameterDescriptorGroup descriptor)
Prints the elements of a descriptor group to the output stream. |
void |
format(ParameterValueGroup values)
Prints the elements of a parameter group to the output stream. |
protected String |
formatValue(Object value)
Format the specified value as a string. |
Locale |
getLocale()
Returns the current locale. |
static void |
print(OperationMethod operation)
Prints the elements of an operation to the default output stream. |
static void |
print(ParameterDescriptorGroup descriptor)
Prints the elements of a descriptor group to the default output stream. |
static void |
print(ParameterValueGroup values)
Prints the elements of a parameter group to the default output stream. |
void |
setLocale(Locale locale)
Set the locale to use for table formatting. |
void |
summary(Collection<? extends IdentifiedObject> parameters,
Set<String> scopes)
Formats a summary of a collection of identified objects. |
Methods inherited from class FilterWriter |
---|
close, flush, write, write, write |
Methods inherited from class Writer |
---|
append, append, append, write, write |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParameterWriter()
public ParameterWriter(Writer out)
Method Detail |
---|
public static void print(OperationMethod operation)
new
ParameterWriter().format(operation)
.
public static void print(ParameterDescriptorGroup descriptor)
new
ParameterWriter().format(descriptor)
.
public static void print(ParameterValueGroup values)
new
ParameterWriter().format(values)
.
public void format(OperationMethod operation) throws IOException
operation
- The operation method to format.
IOException
- if an error occured will writing to the stream.public void format(ParameterDescriptorGroup descriptor) throws IOException
descriptor
- The descriptor group to format.
IOException
- if an error occured will writing to the stream.public void format(ParameterValueGroup values) throws IOException
values
- The parameter group to format.
IOException
- if an error occured will writing to the stream.public void summary(Collection<? extends IdentifiedObject> parameters, Set<String> scopes) throws IOException
parameters
- The collection of parameters to format.scopes
- The set of scopes to include in the table, of null
for all
of them. A restricted a set will produce a table with less columns.
IOException
- if an error occured will writing to the stream.public Locale getLocale()
ParameterWriter
use the system default.
public void setLocale(Locale locale)
protected String formatValue(Object value)
format(...)
methods. The default implementation format
Number
, Date
and Angle
object according the
current locale. This method can been overridden if
more objects need to be formatted in a special way.
value
- the value to format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |