public final class JavaObject extends LispObject implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static Symbol |
_JAVA_OBJECT_TO_STRING_LENGTH |
static Symbol |
ENSURE_JAVA_CLASS |
static Symbol |
FALSE |
static Symbol |
JAVA_CLASS |
static Symbol |
JAVA_CLASS_JCLASS |
static LispObject |
JAVA_OBJECT_TO_STRING_LENGTH |
static Symbol |
NULL |
static Symbol |
TRUE |
| Constructor and Description |
|---|
JavaObject(java.lang.Object obj) |
JavaObject(java.lang.Object obj,
java.lang.Class<?> intendedClass)
Constructs a Java Object with the given intended class, used to access
the object reflectively.
|
| Modifier and Type | Method and Description |
|---|---|
LispObject |
classOf() |
static java.lang.String |
describeJavaObject(JavaObject javaObject) |
static void |
doClassHierarchy(java.lang.Class<?> clss,
LispObject callback)
Executes a function recursively over
|
boolean |
equal(LispObject other) |
boolean |
equalp(LispObject other) |
static LispObject |
findJavaClass(java.lang.Class<?> javaClass) |
LispObject |
getDescription() |
static LispObject |
getInstance(java.lang.Object obj)
Encapsulates obj, if required.
|
static LispObject |
getInstance(java.lang.Object obj,
boolean translated)
Encapsulates obj, if required.
|
static LispObject |
getInstance(java.lang.Object obj,
boolean translated,
java.lang.Class<?> intendedClass)
Encapsulates obj, if required.
|
static LispObject |
getInstance(java.lang.Object obj,
java.lang.Class<?> intendedClass)
Encapsulates obj, if required.
|
java.lang.Class<?> |
getIntendedClass() |
java.lang.Object |
getObject() |
static java.lang.Object |
getObject(LispObject o) |
LispObject |
getParts()
Implementing the getParts() protocol will allow INSPECT to
return information about the substructure of a descendent of
LispObject.
|
java.lang.Object |
javaInstance() |
java.lang.Object |
javaInstance(java.lang.Class<?> c) |
java.lang.Object |
lockableInstance()
Returns the encapsulated Java object for
interoperability with wait, notify, synchronized, etc.
|
static LispObject |
mapcarClassHierarchy(java.lang.Class<?> clss,
LispObject fn) |
java.lang.String |
printObject() |
static LispObject |
registerJavaClass(java.lang.Class<?> javaClass,
LispObject classMetaObject) |
LispObject |
STRING() |
int |
sxhash() |
LispObject |
typeOf() |
LispObject |
typep(LispObject type) |
ABS, add, add, aref_long, aref, AREF, AREF, aset, aset, aset, ash, ash, atom, ATOM, caddr, cadr, car, cddr, cdr, CHAR, characterp, CHARACTERP, chars, COMPLEXP, constantp, CONSTANTP, copyToArray, decr, DENOMINATOR, dispatch, divideBy, doubleValue, elt, endp, ENDP, EQ, eql, eql, eql, EQL, equal, EQUAL, equalp, evenp, EVENP, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, floatp, FLOATP, floatValue, getBooleanValue, getCallCount, getDocumentation, getFixnumSlotValue, getHotCount, getInstance, getPropertyList, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, getSlotValue, getSlotValueAsBoolean, getStringChars, getStringValue, getSymbolFunction, getSymbolFunctionOrDie, getSymbolSetfFunction, getSymbolSetfFunctionOrDie, getSymbolValue, incr, incrementCallCount, incrementHotCount, integerp, INTEGERP, intValue, IS_E, IS_GE, IS_GT, IS_LE, IS_LT, IS_NE, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNotEqualTo, isNotEqualTo, isSpecialOperator, isSpecialVariable, LDB, length, LENGTH, listp, LISTP, LOGAND, LOGAND, LOGIOR, LOGIOR, LOGNOT, LOGXOR, LOGXOR, longValue, minusp, MINUSP, MOD, MOD, multiplyBy, multiplyBy, negate, noFillPointer, NOT, nreverse, NTH, NTH, nthcdr, numberp, NUMBERP, NUMERATOR, oddp, ODDP, plusp, PLUSP, princToString, psxhash, psxhash, push, rationalp, RATIONALP, realp, REALP, resolve, reverse, RPLACA, RPLACD, SCHAR, setCallCount, setCar, setCdr, setDocumentation, setHotCount, setPropertyList, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, setSlotValue, setSlotValue, SIMPLE_STRING_P, SLOT_VALUE, stringp, STRINGP, subtract, subtract, SVREF, svset, SYMBOLP, truncate, unreadableString, unreadableString, VECTOR_PUSH_EXTEND, VECTOR_PUSH_EXTEND, vectorp, VECTORP, vectorPushExtend, zerop, ZEROPpublic static final Symbol JAVA_CLASS_JCLASS
public static final Symbol JAVA_CLASS
public static final Symbol ENSURE_JAVA_CLASS
public static LispObject JAVA_OBJECT_TO_STRING_LENGTH
public static final Symbol _JAVA_OBJECT_TO_STRING_LENGTH
public static final Symbol NULL
public static final Symbol TRUE
public static final Symbol FALSE
public JavaObject(java.lang.Object obj)
public JavaObject(java.lang.Object obj,
java.lang.Class<?> intendedClass)
java.lang.ClassCastException - if the object is not an instance of the
intended class.public LispObject typeOf()
typeOf in class LispObjectpublic LispObject classOf()
classOf in class LispObjectpublic LispObject typep(LispObject type)
typep in class LispObjectpublic LispObject STRING()
STRING in class LispObjectpublic final java.lang.Object getObject()
public static final LispObject getInstance(java.lang.Object obj)
LispObject, it's returned as-is.obj - Any java objectpublic static final LispObject getInstance(java.lang.Object obj, java.lang.Class<?> intendedClass)
LispObject, it's returned as-is.
If not, a java object with the specified intended class is returned.obj - Any java objectintendedClass - the class that shall be used to access objpublic static final LispObject getInstance(java.lang.Object obj, boolean translated)
LispObject, it's returned as-is.
If obj is of a type which can be mapped to a lisp type,
an object of the mapped type is returned, if translated is true.obj - translated - public static final LispObject getInstance(java.lang.Object obj, boolean translated, java.lang.Class<?> intendedClass)
LispObject, it's returned as-is.
If obj is of a type which can be mapped to a lisp type,
an object of the mapped type is returned, if translated is true.obj - translated - intendedClass - the class that shall be used to reflectively
access obj; it is an error for obj not to be
an instance of this class. This parameter is ignored
if translated == true and the object can be
converted to a Lisp object.public java.lang.Object javaInstance()
javaInstance in class LispObjectpublic java.lang.Object javaInstance(java.lang.Class<?> c)
javaInstance in class LispObjectpublic java.lang.Object lockableInstance()
lockableInstance in class LispObjectpublic java.lang.Class<?> getIntendedClass()
public static final java.lang.Object getObject(LispObject o)
public final boolean equal(LispObject other)
equal in class LispObjectpublic final boolean equalp(LispObject other)
equalp in class LispObjectpublic int sxhash()
sxhash in class LispObjectpublic java.lang.String printObject()
printObject in class LispObjectpublic LispObject getDescription()
getDescription in class LispObjectpublic LispObject getParts()
LispObjectgetParts in class LispObjectpublic static void doClassHierarchy(java.lang.Class<?> clss,
LispObject callback)
public static LispObject mapcarClassHierarchy(java.lang.Class<?> clss, LispObject fn)
public static java.lang.String describeJavaObject(JavaObject javaObject)
public static LispObject registerJavaClass(java.lang.Class<?> javaClass, LispObject classMetaObject)
public static LispObject findJavaClass(java.lang.Class<?> javaClass)