PropertyFormatter
DefaultEnhancedPropertyFormatter
, EnhancedPropertyFormatterWrapper
public interface EnhancedPropertyFormatter extends PropertyFormatter
Any implementation of EnhancedPropertyFormatter
must have a public no-argument constructor. A single instance
will be created for each property; consequently, implementations must be thread safe.
DefaultEnhancedPropertyFormatter
Modifier and Type | Method | Description |
---|---|---|
void |
appendFormatted(StringBuilder builder,
boolean b) |
Format a boolean.
|
void |
appendFormatted(StringBuilder builder,
boolean[] booleans) |
Format an array of booleans
|
void |
appendFormatted(StringBuilder builder,
byte b) |
Format a byte
|
void |
appendFormatted(StringBuilder builder,
byte[] bytes) |
Format an array of bytes
|
void |
appendFormatted(StringBuilder builder,
char c) |
Format a character
|
void |
appendFormatted(StringBuilder builder,
char[] chars) |
Format an array of characters
|
void |
appendFormatted(StringBuilder builder,
double d) |
Format a double
|
void |
appendFormatted(StringBuilder builder,
double[] doubles) |
Format an array of doubles
|
void |
appendFormatted(StringBuilder builder,
float f) |
Format a float
|
void |
appendFormatted(StringBuilder builder,
float[] floats) |
Format an array of floats
|
void |
appendFormatted(StringBuilder builder,
int i) |
Format an integer
|
void |
appendFormatted(StringBuilder builder,
int[] ints) |
Format an array of integers
|
void |
appendFormatted(StringBuilder builder,
long l) |
Format a long
|
void |
appendFormatted(StringBuilder builder,
long[] longs) |
Format an array of longs
|
void |
appendFormatted(StringBuilder builder,
short s) |
Format a short
|
void |
appendFormatted(StringBuilder builder,
short[] shorts) |
Format an array of shorts
|
void |
appendFormatted(StringBuilder builder,
Object o) |
Format an object; no attempt will be made to format it as an array.
|
void |
appendFormatted(StringBuilder builder,
Object[] objects) |
Format an array of Objects
|
void |
appendFormattedPossibleArray(StringBuilder builder,
Object o) |
Format an object, which may be an array.
|
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) . |
format
void initialize(AnnotatedElement element)
PropertyFormatter
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 PropertyFormatter
element
- the field or method this formatter will be used for.void appendFormatted(StringBuilder builder, Object o)
builder
- the builder to append the formatted representation of the object too
- the object to formatvoid appendFormatted(StringBuilder builder, boolean b)
builder
- the builder to append the formatted representation of the boolean tob
- the boolean to formatvoid appendFormatted(StringBuilder builder, byte b)
builder
- the builder to append the formatted representation of the byte tob
- the byte to formatvoid appendFormatted(StringBuilder builder, short s)
builder
- the builder to append the formatted representation of the short tos
- the short to formatvoid appendFormatted(StringBuilder builder, char c)
builder
- the builder to append the formatted representation of the character toc
- the character to formatvoid appendFormatted(StringBuilder builder, int i)
builder
- the builder to append the formatted representation of the integer toi
- the integer to formatvoid appendFormatted(StringBuilder builder, long l)
builder
- the builder to append the formatted representation of the long tol
- the long to formatvoid appendFormatted(StringBuilder builder, float f)
builder
- the builder to append the formatted representation of the float tof
- the float to formatvoid appendFormatted(StringBuilder builder, double d)
builder
- the builder to append the formatted representation of the double tod
- the double to formatvoid appendFormatted(StringBuilder builder, boolean[] booleans)
builder
- the builder to append the formatted representation of the array tobooleans
- the array to formatvoid appendFormatted(StringBuilder builder, byte[] bytes)
builder
- the builder to append the formatted representation of the array tobytes
- the array to formatvoid appendFormatted(StringBuilder builder, short[] shorts)
builder
- the builder to append the formatted representation of the array toshorts
- the array to formatvoid appendFormatted(StringBuilder builder, char[] chars)
builder
- the builder to append the formatted representation of the array tochars
- the array to formatvoid appendFormatted(StringBuilder builder, int[] ints)
builder
- the builder to append the formatted representation of the array toints
- the array to formatvoid appendFormatted(StringBuilder builder, long[] longs)
builder
- the builder to append the formatted representation of the array tolongs
- the array to formatvoid appendFormatted(StringBuilder builder, float[] floats)
builder
- the builder to append the formatted representation of the array tofloats
- the array to formatvoid appendFormatted(StringBuilder builder, double[] doubles)
builder
- the builder to append the formatted representation of the array todoubles
- the array to formatvoid appendFormatted(StringBuilder builder, Object[] objects)
builder
- the builder to append the formatted representation of the array toobjects
- the array to formatvoid appendFormattedPossibleArray(StringBuilder builder, Object o)
builder
- the builder to append the formatted representation of the object too
- the object to formatCopyright © 2008–2018. All rights reserved.