PojoFormatter
DefaultEnhancedPojoFormatter
instead.@Deprecated public class DefaultPojoFormatter extends Object implements PojoFormatter
Pojomatic
. This implementation first presents
the class name, and then each property in turn, separated by commas, using braces to indicate
nesting.
For example, if a class Person has two properties, firstName and LastName, and these properties
are using DefaultPropertyFormatter
, then the Person
instance representing Joe Blow would be represented as
"Person{firstName: {Joe}, lastName: {Blow}}"
Constructor | Description |
---|---|
DefaultPojoFormatter() |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
String |
getPropertyPrefix(PropertyElement property) |
Deprecated.
Get the
String prefix for a given PropertyElement . |
String |
getPropertySuffix(PropertyElement property) |
Deprecated.
Get the
String suffix for a given PropertyElement . |
String |
getToStringPrefix(Class<?> pojoClass) |
Deprecated.
Get the
String which should appear at the beginning of the result of
toString() . |
String |
getToStringSuffix(Class<?> pojoClass) |
Deprecated.
Get the
String which should appear at the end of the result of
toString() . |
public String getPropertyPrefix(PropertyElement property)
PojoFormatter
String
prefix for a given PropertyElement
. This method will be called
once for each property used in the result of toString()
, in the order in which
those properties will appear in that result, and before the call to
PropertyFormatter.format(Object)
for the property's value.getPropertyPrefix
in interface PojoFormatter
property
- the property for which to generate a prefixpublic String getPropertySuffix(PropertyElement property)
PojoFormatter
String
suffix for a given PropertyElement
. This method will be called
once after each call to PropertyFormatter.format(Object)
for the property's value.getPropertySuffix
in interface PojoFormatter
property
- the property for which to generate a suffixpublic String getToStringPrefix(Class<?> pojoClass)
PojoFormatter
String
which should appear at the beginning of the result of
toString()
.getToStringPrefix
in interface PojoFormatter
pojoClass
- the class for which toString()
is being calledtoString()
Object.toString()
public String getToStringSuffix(Class<?> pojoClass)
PojoFormatter
String
which should appear at the end of the result of
toString()
.getToStringSuffix
in interface PojoFormatter
pojoClass
- the class for which toString()
is being calledtoString()
Object.toString()
Copyright © 2008–2018. All rights reserved.