public class DisplayFormat
extends gnu.kawa.format.GenericFormat
gnu.kawa.format.GenericFormat.Entry, gnu.kawa.format.GenericFormat.MethodEntry, gnu.kawa.format.GenericFormat.TryFormatResult
Modifier and Type | Field and Description |
---|---|
int |
checkSharing
Controls whether we check for sharing and cycles.
|
static ThreadLocation |
outBase
Fluid parameter to specify default output base for printing rationals.
|
static ThreadLocation |
outRadix
True if we should print a radix indicator when printing rationals.
|
static DisplayFormat |
schemeDisplayFormat |
static DisplayFormat |
schemeWriteFormat |
static DisplayFormat |
schemeWriteSharedFormat |
static DisplayFormat |
schemeWriteSimpleFormat |
static gnu.kawa.format.GenericFormat |
standardFormat |
Constructor and Description |
---|
DisplayFormat(boolean readable,
char language)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
static DisplayFormat |
getCommonLispFormat(boolean readable) |
static DisplayFormat |
getEmacsLispFormat(boolean readable) |
boolean |
getReadableOutput()
True if output should be easy to (machine-) read.
|
static DisplayFormat |
getSchemeFormat(boolean readable) |
boolean |
textIsCopied()
True if strings/characters are written without escape or quoting.
|
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeArray(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
void |
writeBoolean(boolean v,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeBoolean(java.lang.Object v,
gnu.kawa.format.AbstractFormat f,
Consumer out) |
static void |
writeChar(int v,
boolean readable,
char language,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeChar(java.lang.Object v,
gnu.kawa.format.AbstractFormat f,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeCharSeq(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeEnum(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeJavaArray(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeKNode(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeList(java.lang.Object list,
gnu.kawa.format.AbstractFormat format,
Consumer out)
Format a list.
|
void |
writeObject(java.lang.Object obj,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeObjectDefault(java.lang.Object obj,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writePicture(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writePrintableConsumable(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writePromise(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeRange(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeRational(java.lang.Object obj,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeSequence(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeSymbol(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeURI(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
static gnu.kawa.format.GenericFormat.TryFormatResult |
writeValues(java.lang.Object value,
gnu.kawa.format.AbstractFormat format,
Consumer out) |
add, add, addInvalidatingCache, invalidateCache, tryFormat
public static gnu.kawa.format.GenericFormat standardFormat
public static final ThreadLocation outBase
public static final ThreadLocation outRadix
public static final DisplayFormat schemeDisplayFormat
public static final DisplayFormat schemeWriteSimpleFormat
public static final DisplayFormat schemeWriteFormat
public static final DisplayFormat schemeWriteSharedFormat
public int checkSharing
public DisplayFormat(boolean readable, char language)
readable
- if output should be formatted so it could be read
back in again, for example strings shoudl be quoted.language
- the programming language style to use, where
'S' is Scheme, 'C' is Common Lisp, and 'E' is Emacs Lisp.public static DisplayFormat getEmacsLispFormat(boolean readable)
public static DisplayFormat getCommonLispFormat(boolean readable)
public static DisplayFormat getSchemeFormat(boolean readable)
public boolean getReadableOutput()
gnu.kawa.format.AbstractFormat
getReadableOutput
in class gnu.kawa.format.AbstractFormat
public boolean textIsCopied()
gnu.kawa.format.AbstractFormat
textIsCopied
in class gnu.kawa.format.AbstractFormat
public void writeBoolean(boolean v, Consumer out)
writeBoolean
in class gnu.kawa.format.AbstractFormat
public static gnu.kawa.format.GenericFormat.TryFormatResult writeBoolean(java.lang.Object v, gnu.kawa.format.AbstractFormat f, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeChar(java.lang.Object v, gnu.kawa.format.AbstractFormat f, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeRational(java.lang.Object obj, gnu.kawa.format.AbstractFormat format, Consumer out)
public static void writeChar(int v, boolean readable, char language, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeList(java.lang.Object list, gnu.kawa.format.AbstractFormat format, Consumer out)
list
- The list on which the method CDR's, termination occurs when
this becomes a non-pair or the empty listout
- The output port that is responsible for the pretty printingpublic static gnu.kawa.format.GenericFormat.TryFormatResult writeArray(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeRange(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeJavaArray(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeSequence(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeValues(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writePrintableConsumable(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public void writeObject(java.lang.Object obj, Consumer out)
writeObject
in class gnu.kawa.format.GenericFormat
public static gnu.kawa.format.GenericFormat.TryFormatResult writeObjectDefault(java.lang.Object obj, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeCharSeq(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeEnum(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeSymbol(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writePicture(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeKNode(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writePromise(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)
public static gnu.kawa.format.GenericFormat.TryFormatResult writeURI(java.lang.Object value, gnu.kawa.format.AbstractFormat format, Consumer out)