toString styling conventions.
Uses the reflective visitor pattern underneath the hood to nicely encapsulate styling algorithms for each type of styled object.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public String | style(Object
the Object value to style value)Implements org. Style the given value, returning a String representation. |
| protected String | Returns: a styled version of the supplied arrayGenerate a styled version of the supplied array. |
| protected String | Returns: a styled version of the supplied classGenerate a styled version of the supplied |
| protected String | Returns: a styled version of the supplied collectionGenerate a styled version of the supplied |
| protected <K, V> String | |
| protected String | Returns: a styled version of the supplied map entryGenerate a styled version of the supplied |
| protected String | Returns: a styled version of the supplied methodGenerate a styled version of the supplied |
| protected String | |
| protected String | Returns: a styled version of the supplied objectGenerate a styled version of the supplied |
| protected String | Returns: a styled version of the supplied stringGenerate a styled version of the supplied |
| ARRAY | back to summary |
|---|---|
| private static final String ARRAY | |
| COLLECTION | back to summary |
|---|---|
| private static final String COLLECTION | |
| EMPTY | back to summary |
|---|---|
| private static final String EMPTY | |
| EMPTY_MAP | back to summary |
|---|---|
| private static final String EMPTY_MAP | |
| LIST | back to summary |
|---|---|
| private static final String LIST | |
| MAP | back to summary |
|---|---|
| private static final String MAP | |
| NULL | back to summary |
|---|---|
| private static final String NULL | |
| SET | back to summary |
|---|---|
| private static final String SET | |
| DefaultValueStyler | back to summary |
|---|---|
| public DefaultValueStyler() | |
| getCollectionTypeString | back to summary |
|---|---|
| private static String getCollectionTypeString(Collection<?> collection) | |
| style | back to summary |
|---|---|
| public String style(Object value) Implements org. Doc from org. Style the given value, returning a String representation. | |
| styleArray | back to summary |
|---|---|
| protected String styleArray(Object[] array) Generate a styled version of the supplied array.
| |
| styleClass | back to summary |
|---|---|
| protected String styleClass(Class<?> clazz) Generate a styled version of the supplied The default implementation delegates to
| |
| styleCollection | back to summary |
|---|---|
| protected String styleCollection(Collection<?> collection) Generate a styled version of the supplied
| |
| styleMap | back to summary |
|---|---|
| protected <K, V> String styleMap(Map<K, V> map) Generate a styled version of the supplied
| |
| styleMapEntry | back to summary |
|---|---|
| protected String styleMapEntry(Map. Generate a styled version of the supplied
| |
| styleMethod | back to summary |
|---|---|
| protected String styleMethod(Method method) Generate a styled version of the supplied The default implementation returns the method's name and the short name of the
method's declaring class, separated by
the
| |
| styleNull | back to summary |
|---|---|
| protected String styleNull() Generate a styled version of The default implementation returns
| |
| styleObject | back to summary |
|---|---|
| protected String styleObject(Object obj) Generate a styled version of the supplied This method is only invoked by The default implementation delegates to
| |
| styleString | back to summary |
|---|---|
| protected String styleString(String str) Generate a styled version of the supplied The default implementation returns the supplied string wrapped in single quotes.
| |