ReflectionStringifier

public final class ReflectionStringifier implements Stringifier(source)

A stringifier for transforming reflection object to string objects.

Properties

Link copied to clipboard
public final static ReflectionStringifier instance
The singleton instance of this class.

Functions

Link copied to clipboard
Returns an instance of this class.
Link copied to clipboard
public Stringifier orElse(Stringifier stringifier)
Returns a new stringifier using the given stringifier as an alternative to the current stringifier if the current stringifier cannot create a string representation.
Link copied to clipboard
public void registerObjectHandler(Matcher<Object> matcher, Function<Object, String> handler)
Registers an object handler for the given matcher.
Link copied to clipboard
public void registerTypeHandler(Class<? extends Object> clazz, Function<Object, String> handler)
Registers a type handler for the given class.
public void registerTypeHandler(Matcher<TypeLink> matcher, Function<Object, String> handler)
Registers a type handler for the given matcher.
Link copied to clipboard
public String stringify(Object object)
Creates a string representation of the given object or null, if no string representation can be created.
Link copied to clipboard
public String stringifyOrElseDefault(Object object, String defaultString)
Creates a string representation of the given object or use the given default string, if no string representation can be created.
public String stringifyOrElseDefault(Object object, Supplier<String> defaultStringSupplier)
Creates a string representation of the given object or the default string supplied by the given suuplier, if no string representation can be created.
Link copied to clipboard
Creates a string representation of the given object or null, if no string representation can be created.
Link copied to clipboard
Creates a string representation of the given object or use toString, if no string representation can be created.