public abstract class Util extends java.lang.Object implements Version
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static AnnotatedExpr |
annotated(Value o) |
static Expression |
annotatedAppEval(java.lang.Class clazz,
java.lang.String fn) |
static Pair |
append(Pair p1,
Pair p2) |
static void |
argCheck(Pair argl,
int arity) |
static Symbol[] |
argsToSymbols(Pair p) |
static Value |
assq(Value v,
Pair p) |
static SchemeBinaryInputPort |
bininport(Value o) |
static java.io.InputStream |
bininstream(Value o) |
static SchemeBinaryOutputPort |
binoutport(Value o) |
static java.io.OutputStream |
binoutstream(Value o) |
static Box |
box(Value o) |
static char |
character(Value c) |
static SchemeCharacterInputPort |
charinport(Value o) |
static java.io.Reader |
charinreader(Value o) |
static SchemeCharacterOutputPort |
charoutport(Value o) |
static java.io.Writer |
charoutwriter(Value o) |
static Charset |
charsetFromString(java.lang.String charsetName)
Converts a character set name to a Charset.
|
static SchemeCharacter |
chr(Value o) |
static CallFrame |
cont(Value o) |
static java.lang.ClassLoader |
currentClassLoader() |
static SymbolicEnvironment |
env(Value o) |
static void |
error(Interpreter r,
Pair error) |
static void |
error(Interpreter r,
java.lang.String errormessage) |
static void |
error(Interpreter r,
java.lang.String errormessage,
Pair moreData) |
static void |
error(Interpreter r,
Value errormessage) |
static void |
error(Interpreter r,
Value where,
java.lang.String errormessage) |
static void |
error(Interpreter r,
Value where,
java.lang.String errormessage,
java.lang.Exception e) |
static void |
error(Interpreter r,
Value where,
java.lang.String errormessage,
Pair moreData) |
static Expression |
expr(Value o) |
static Charset |
getDefaultCharacterSet()
Return the default character set, which is UTF-8, but could in
principle change.
|
static ImmutablePair |
immutablePair(Value o) |
static ImmutableVector |
immutableVector(Value o) |
static InputPort |
inport(Value o) |
protected static java.lang.String |
javaExceptionToString(java.lang.Exception e) |
static Value |
javaWrap(java.lang.Object o) |
static java.lang.String |
justify(java.lang.String v,
int p,
char c) |
static int |
length(Pair p) |
static java.lang.String |
liMessage(Symbol bundleName,
java.lang.String messageName) |
static java.lang.String |
liMessage(Symbol bundle,
java.lang.String messageName,
java.lang.Object[] args) |
static java.lang.String |
liMessage(Symbol bundle,
java.lang.String messageName,
java.lang.String arg1) |
static java.lang.String |
liMessage(Symbol bundle,
java.lang.String messageName,
java.lang.String arg1,
int arg2,
int arg3) |
static java.lang.String |
liMessage(Symbol bundle,
java.lang.String messageName,
java.lang.String arg1,
java.lang.String arg2) |
static java.lang.String |
liMessage(Symbol bundle,
java.lang.String messageName,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3) |
static java.lang.String |
liMessage(Symbol bundle,
java.lang.String messageName,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4) |
static Pair |
list(Value o1) |
static Pair |
list(Value o1,
Value o2) |
static Pair |
list(Value o1,
Value o2,
Value o3) |
static Pair |
list(Value o1,
Value o2,
Value o3,
Value o4) |
static Pair |
list(Value o1,
Value o2,
Value o3,
Value o4,
Value o5) |
static java.net.URL |
makeURL(java.lang.String url) |
static Pair |
mapcar(Pair list) |
static Value |
memq(Value v,
Pair p) |
static NativeLibrary |
nlib(Value o) |
static Quantity |
num(Value o) |
static OutputPort |
outport(Value o) |
static Pair |
pair(Value o) |
static Expression[] |
pairToExpressions(Pair p) |
static java.util.Vector |
pairToExpVect(Pair p)
Deprecated.
Obsoleted by pairToExpressions and pairToValues.
|
static Value[] |
pairToValues(Pair p) |
static Procedure |
proc(Value o) |
static Value |
read(java.lang.String expr) |
static void |
registerBundle(Symbol bundleName) |
static Pair |
reverse(Pair p) |
static Pair |
reverseInPlace(Pair s) |
static java.lang.String |
simpleErrorToString(Pair p) |
static Pair |
sourceAnnotations(java.lang.String file,
int line,
int column,
Pair anns) |
static SchemeString |
str(Value o) |
static java.lang.String |
string(Value o) |
static Symbol |
sym(java.lang.String s) |
static Symbol |
symbol(Value o) |
static java.lang.String |
symval(Value o) |
static Pair |
truePair(Value o) |
static SchemeBoolean |
truth(boolean b) |
static boolean |
truth(Value v) |
static void |
typeError(java.lang.String type,
Value o) |
static void |
typeError(Symbol bundleName,
java.lang.String type,
Value o) |
static void |
updateName(Value v,
Symbol s) |
static java.net.URL |
url(java.lang.String s) |
static java.net.URL |
url(Value v) |
static java.net.URL |
url(Value current,
Value v) |
static Pair |
valArrayToList(Value[] r) |
static Pair |
valArrayToList(Value[] r,
int offset,
int len) |
static SchemeVector |
valArrayToVec(Value[] r) |
static SchemeVector |
vec(Value o) |
static java.lang.String |
warn(java.lang.String messageClass) |
static java.lang.String |
warn(java.lang.String messageClass,
java.lang.String arg) |
static java.lang.String |
warn(java.lang.String messageClass,
java.lang.String sourceFile,
int lineNumber,
int columnNumber) |
public static final boolean caseSensitive
public static final boolean permitInterrupts
public static final int minFloatPrecision
public static final int maxFloatPrecision
public static final Value[] ZV
public static final Quantity FIVE
public static EOFObject EOF
public static Syntax QUOTE
public static EmptyList EMPTYLIST
public static SchemeVoid VOID
public static SchemeBoolean TRUE
public static SchemeBoolean FALSE
public static SchemeVector EMPTYVEC
public static Symbol BEGIN
public static Symbol ERRORK
public static Symbol EXPSC
public static Symbol EXPTOP
public static Symbol FCONT
public static Symbol JEXCEPTION
public static Symbol LAMBDA
public static Symbol LOCATION
public static Symbol MESSAGE
public static Symbol NAME
public static Symbol OTHER
public static Symbol PARENT
public static Symbol QUOTESYM
public static Symbol REPORT
public static Symbol SETBANG
public static Symbol SISC
public static Symbol SISC_SPECIFIC
public static Symbol SYMENV
public static Symbol THIS
public static Symbol TOPLEVEL
public static Symbol BACKQUOTE
public static Symbol UNQUOTE
public static Symbol UNQUOTE_SPLICING
public static Symbol SOURCE_LINE
public static Symbol SOURCE_COLUMN
public static Symbol SOURCE_FILE
public static Symbol EVAL
public static Symbol SISCB
public static java.util.WeakHashMap bundles
public static java.lang.String warn(java.lang.String messageClass)
public static java.lang.String warn(java.lang.String messageClass, java.lang.String sourceFile, int lineNumber, int columnNumber)
public static java.lang.String warn(java.lang.String messageClass, java.lang.String arg)
public static Value javaWrap(java.lang.Object o)
public static void error(Interpreter r, Value where, java.lang.String errormessage, Pair moreData) throws ContinuationException
ContinuationException
public static void error(Interpreter r, Value where, java.lang.String errormessage, java.lang.Exception e) throws ContinuationException
ContinuationException
public static void error(Interpreter r, Value where, java.lang.String errormessage) throws ContinuationException
ContinuationException
public static void error(Interpreter r, java.lang.String errormessage, Pair moreData) throws ContinuationException
ContinuationException
public static void error(Interpreter r, java.lang.String errormessage) throws ContinuationException
ContinuationException
public static void error(Interpreter r, Value errormessage) throws ContinuationException
ContinuationException
public static java.lang.String simpleErrorToString(Pair p)
public static java.lang.ClassLoader currentClassLoader()
public static Value read(java.lang.String expr) throws java.io.IOException
java.io.IOException
public static void error(Interpreter r, Pair error) throws ContinuationException
ContinuationException
public static java.lang.String justify(java.lang.String v, int p, char c)
public static final void argCheck(Pair argl, int arity) throws java.lang.Exception
java.lang.Exception
public static int length(Pair p)
public static java.util.Vector pairToExpVect(Pair p)
p
- the head of a listpublic static Expression[] pairToExpressions(Pair p)
public static void typeError(java.lang.String type, Value o)
public static final Symbol sym(java.lang.String s)
public static final java.lang.String symval(Value o)
public static final char character(Value c)
public static final SchemeCharacter chr(Value o)
public static final java.lang.String string(Value o)
public static final SchemeString str(Value o)
public static final SchemeVector vec(Value o)
public static final OutputPort outport(Value o)
public static final SchemeBinaryOutputPort binoutport(Value o)
public static final java.io.OutputStream binoutstream(Value o)
public static final SchemeCharacterOutputPort charoutport(Value o)
public static final java.io.Writer charoutwriter(Value o)
public static final SchemeBinaryInputPort bininport(Value o)
public static final java.io.InputStream bininstream(Value o)
public static final SchemeCharacterInputPort charinport(Value o)
public static final java.io.Reader charinreader(Value o)
public static final SymbolicEnvironment env(Value o)
public static final Expression expr(Value o)
public static final AnnotatedExpr annotated(Value o)
public static java.net.URL makeURL(java.lang.String url)
public static java.net.URL url(Value v)
public static java.net.URL url(java.lang.String s) throws java.net.MalformedURLException
java.net.MalformedURLException
public static final NativeLibrary nlib(Value o)
public static final ImmutablePair immutablePair(Value o)
public static final ImmutableVector immutableVector(Value o)
public static final SchemeBoolean truth(boolean b)
public static final boolean truth(Value v)
public static final SchemeVector valArrayToVec(Value[] r)
public static void registerBundle(Symbol bundleName) throws java.util.MissingResourceException
java.util.MissingResourceException
public static java.lang.String liMessage(Symbol bundleName, java.lang.String messageName)
public static java.lang.String liMessage(Symbol bundle, java.lang.String messageName, java.lang.String arg1)
public static java.lang.String liMessage(Symbol bundle, java.lang.String messageName, java.lang.String arg1, java.lang.String arg2)
public static java.lang.String liMessage(Symbol bundle, java.lang.String messageName, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
public static java.lang.String liMessage(Symbol bundle, java.lang.String messageName, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4)
public static java.lang.String liMessage(Symbol bundle, java.lang.String messageName, java.lang.String arg1, int arg2, int arg3)
public static java.lang.String liMessage(Symbol bundle, java.lang.String messageName, java.lang.Object[] args)
protected static java.lang.String javaExceptionToString(java.lang.Exception e)
public static Pair sourceAnnotations(java.lang.String file, int line, int column, Pair anns)
public static Expression annotatedAppEval(java.lang.Class clazz, java.lang.String fn)
public static Charset getDefaultCharacterSet()
public static Charset charsetFromString(java.lang.String charsetName)
charsetName
- the name of a putative character set, or nullgetDefaultCharacterSet()
) if
that is not possible