public final class Descriptions extends Object
AbstractDescriptionWriter
s.Modifier and Type | Method and Description |
---|---|
static Describer<Object> |
defaultDescriber()
Get a default describer.
|
static HashDescriptionWriter |
hashWriter(HashFunction func)
Create a description writer for a particular hash function.
|
static HashDescriptionWriter |
sha1Writer()
Create a description writer that will compute a SHA1 hash.
|
static StringDescriptionWriter |
stringWriter()
Construct a new description writer that outputs a string.
|
public static HashDescriptionWriter sha1Writer()
public static HashDescriptionWriter hashWriter(HashFunction func)
func
- The hash function.func
.public static StringDescriptionWriter stringWriter()
public static Describer<Object> defaultDescriber()
Describable
, call its its Describable.describeTo(DescriptionWriter)
method.Serializable
, write its class and a SHA1 checksum of
its serialized form to the description.UUID
as the object's description. This
UUID is remembered, so the same object will have the same UUID within a single instance of
the JVM.