Package edu.wisc.ssec.mcidasv.util
Class MakeToString
java.lang.Object
edu.wisc.ssec.mcidasv.util.MakeToString
Utility class for
toString() methods.
Largely taken from Guava's toStringHelper(), with some
formatting differences as well as the hash code for the given instance.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final MakeToString.ValueHolderprivate final intprivate booleanprivate MakeToString.ValueHolder -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMakeToString(Object instance) privateMakeToString(String clazzName) -
Method Summary
Modifier and TypeMethodDescriptionprivate MakeToString.ValueHolderprivate MakeToStringstatic MakeToStringstatic MakeToStringfromInstance(Object instance) toString()After calling this method, you can keep adding more properties to later call toString() again and get a more complete representation of the same object; but properties cannot be removed, so this only allows limited reuse of the helper instance.
-
Field Details
-
head
-
className
-
instanceHashCode
-
omitNullValues
-
tail
-
-
Constructor Details
-
MakeToString
-
MakeToString
-
-
Method Details
-
fromInstance
-
fromClass
-
omitNullValues
-
addQuoted
-
add
-
add
-
add
-
add
-
add
-
add
-
add
-
add
-
addHolder
-
addHolder
-
toString
After calling this method, you can keep adding more properties to later call toString() again and get a more complete representation of the same object; but properties cannot be removed, so this only allows limited reuse of the helper instance. The helper allows duplication of properties (multiple name/value pairs with the same name can be added).
-