|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.Util
public class Util
Wrapper class for various helper methods.
Field Summary | |
---|---|
static java.lang.String |
funcObjMethName
Name of Handler Methods |
static java.util.HashMap<java.lang.Class<?>,java.lang.Class<?>> |
unboxed
Unboxed -> Boxed primitive types |
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static java.lang.RuntimeException |
addTop(java.lang.RuntimeException rte,
java.lang.StackTraceElement top)
Add an element to the top of a StackTrace, also used to hide implementation details |
static java.lang.Object |
applyFunc(java.lang.Object f,
java.lang.reflect.Method m,
java.lang.Object[] args)
Apply the given method using the given Object and arguments |
static java.lang.String |
argsString(java.lang.Class<?>[] args,
int i)
Return a pretty argument string for displaying signatures |
static java.lang.Class<?> |
box(java.lang.Class<?> c)
For predicting Box/Unboxing and the associated Type differences/subtyping |
static java.lang.String |
display(java.lang.Object o)
Return a String representation of the given arbitrary Object |
static java.lang.String |
display(java.lang.Object o,
java.lang.Class<?> c,
java.lang.String idt)
Return a String representation of the given Object of the given Class |
static java.lang.String |
display(java.lang.Object o,
java.lang.String idt)
Return a String representation of the given arbitrary Object |
static java.lang.String |
escape(char c)
Return a String for a single expanded/escaped character |
static java.lang.RuntimeException |
exceptionDrop(int n,
java.lang.String msg)
Return an exception, but drop the top N frames (to hide implementation details) |
static java.lang.reflect.Field[] |
fields(java.lang.Class<?> c)
Retrieve the (transitive) fields of the given class |
static void |
main(java.lang.String[] args)
Simple Test for SExp output |
static java.lang.String |
repeat(char c,
int times)
Repeat a character a bunch of times |
static boolean |
subtype(java.lang.Class<?> a,
java.lang.Class<?> b)
Subtype comparison |
static boolean |
subtypes(java.lang.Class<?>[] a,
java.lang.Class<?>[] b)
Array Subtype comparison |
static java.lang.String |
toSExp(java.lang.Object o)
Return a String representing an SExp of the given arbitrary Object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String funcObjMethName
public static java.util.HashMap<java.lang.Class<?>,java.lang.Class<?>> unboxed
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static void main(java.lang.String[] args)
public static java.lang.String argsString(java.lang.Class<?>[] args, int i)
public static java.lang.Class<?> box(java.lang.Class<?> c)
public static boolean subtype(java.lang.Class<?> a, java.lang.Class<?> b)
public static boolean subtypes(java.lang.Class<?>[] a, java.lang.Class<?>[] b)
public static java.lang.Object applyFunc(java.lang.Object f, java.lang.reflect.Method m, java.lang.Object[] args)
public static java.lang.RuntimeException exceptionDrop(int n, java.lang.String msg)
public static java.lang.RuntimeException addTop(java.lang.RuntimeException rte, java.lang.StackTraceElement top)
public static java.lang.String display(java.lang.Object o)
public static java.lang.String display(java.lang.Object o, java.lang.String idt)
public static java.lang.String display(java.lang.Object o, java.lang.Class<?> c, java.lang.String idt)
public static java.lang.String repeat(char c, int times)
public static java.lang.String escape(char c)
public static java.lang.reflect.Field[] fields(java.lang.Class<?> c)
public static java.lang.String toSExp(java.lang.Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |