EnhancedPropertyFormatter, PropertyFormatterpublic class DefaultEnhancedPropertyFormatter extends Object implements EnhancedPropertyFormatter
| Constructor | Description |
|---|---|
DefaultEnhancedPropertyFormatter() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
appendFormatted(StringBuilder builder,
boolean b) |
Format a boolean.
|
void |
appendFormatted(StringBuilder builder,
boolean[] array) |
Format an array of booleans
|
void |
appendFormatted(StringBuilder builder,
byte b) |
Format a byte
|
void |
appendFormatted(StringBuilder builder,
byte[] array) |
Format an array of bytes
|
void |
appendFormatted(StringBuilder builder,
char c) |
Format a character
|
void |
appendFormatted(StringBuilder builder,
char[] array) |
Format an array of characters
|
void |
appendFormatted(StringBuilder builder,
double d) |
Format a double
|
void |
appendFormatted(StringBuilder builder,
double[] array) |
Format an array of doubles
|
void |
appendFormatted(StringBuilder builder,
float f) |
Format a float
|
void |
appendFormatted(StringBuilder builder,
float[] array) |
Format an array of floats
|
void |
appendFormatted(StringBuilder builder,
int i) |
Format an integer
|
void |
appendFormatted(StringBuilder builder,
int[] array) |
Format an array of integers
|
void |
appendFormatted(StringBuilder builder,
long l) |
Format a long
|
void |
appendFormatted(StringBuilder builder,
long[] array) |
Format an array of longs
|
void |
appendFormatted(StringBuilder builder,
short s) |
Format a short
|
void |
appendFormatted(StringBuilder builder,
short[] array) |
Format an array of shorts
|
void |
appendFormatted(StringBuilder builder,
Object value) |
Format an object; no attempt will be made to format it as an array.
|
void |
appendFormatted(StringBuilder builder,
Object[] array) |
Format an array of Objects
|
void |
appendFormattedPossibleArray(StringBuilder builder,
Object value) |
Format an object, which may be an array.
|
String |
format(Object value) |
Format a given value.
|
void |
initialize(AnnotatedElement element) |
Initialize the formatter for use; this method will be called exactly once on an instance, prior
to any calls to
PropertyFormatter.format(Object). |
public void initialize(AnnotatedElement element)
PropertyFormatter.format(Object). This method does not need to be thread-safe. A typical implementation
might inspect the element for additional annotations used to configure the formatter.initialize in interface EnhancedPropertyFormatterinitialize in interface PropertyFormatterelement - the field or method this formatter will be used for.public final String format(Object value)
PropertyFormatterformat in interface PropertyFormattervalue - the value to formatpublic void appendFormatted(StringBuilder builder, Object value)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the object tovalue - the object to formatpublic void appendFormattedPossibleArray(StringBuilder builder, Object value)
EnhancedPropertyFormatterappendFormattedPossibleArray in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the object tovalue - the object to formatpublic void appendFormatted(StringBuilder builder, Object[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, boolean b)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the boolean tob - the boolean to formatpublic void appendFormatted(StringBuilder builder, byte b)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the byte tob - the byte to formatpublic void appendFormatted(StringBuilder builder, short s)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the short tos - the short to formatpublic void appendFormatted(StringBuilder builder, char c)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the character toc - the character to formatpublic void appendFormatted(StringBuilder builder, int i)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the integer toi - the integer to formatpublic void appendFormatted(StringBuilder builder, long l)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the long tol - the long to formatpublic void appendFormatted(StringBuilder builder, float f)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the float tof - the float to formatpublic void appendFormatted(StringBuilder builder, double d)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the double tod - the double to formatpublic void appendFormatted(StringBuilder builder, boolean[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, byte[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, short[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, char[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, int[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, long[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, float[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatpublic void appendFormatted(StringBuilder builder, double[] array)
EnhancedPropertyFormatterappendFormatted in interface EnhancedPropertyFormatterbuilder - the builder to append the formatted representation of the array toarray - the array to formatCopyright © 2008–2018. All rights reserved.