public final class Descriptions
extends java.lang.Object
Utility classes for AbstractDescriptionWriter
s.
Modifier and Type | Method and Description |
---|---|
static Describer<java.lang.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()
Create a description writer that will compute a SHA1 hash.
public static HashDescriptionWriter hashWriter(HashFunction func)
Create a description writer for a particular hash function.
func
- The hash function.func
.public static StringDescriptionWriter stringWriter()
Construct a new description writer that outputs a string.
public static Describer<java.lang.Object> defaultDescriber()
Get a default describer. This describer uses the following algorithm:
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.