Printer<T> class
abstract
An abstract function that prints objects of type T
.
- Mixed in types
- Implementers
- Available Extensions
- Annotations
-
- @immutable
Constructors
- Printer()
-
Generic const constructor.
const
- Printer.literal([String value])
-
Constructs a printer that emits a literal value.
constfactory
-
Printer.pluggable(Map1<
T, String> callback) -
Constructs a printer that evaluates the callback.
constfactory
-
Printer.sequence(Iterable<
Printer< printers)T> > -
Constructs a printer that emits a list of printers.
constfactory
- Printer.standard()
-
Constructs a printer that simply calls
toString()
.constfactory -
Printer.switcher(Map<
Predicate1< cases, {Printer<T> , Printer<T> >T> otherwise}) -
Constructs a printer that switches between other printers.
constfactory
- Printer.wrap(Object? object)
-
Constructs a printer by wrapping
object
.factory
Properties
- defaultToStringPrinter → ObjectPrinter
-
Override to configure the empty ObjectPrinter.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toStringPrinter → ObjectPrinter
-
Override and call super to add values to the ObjectPrinter.
no setterinherited
Methods
-
call(
T object) → String -
Prints the
object
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
print(
T object) → String -
Returns the printed
object
. -
printOn(
T object, StringBuffer buffer) → void -
Prints the
object
intobuffer
. -
toString(
) → String -
Standard
toString
implementation. Do not override, instead implement toStringPrinter to customize.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited