|
Jatha Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jatha.dynatype.StandardLispValue org.jatha.dynatype.StandardLispAtom org.jatha.dynatype.StandardLispSymbol
public class StandardLispSymbol
LispSymbol implements LISP Symbols, including provisions for special bindings.
LispValue
,
LispAtom
Field Summary | |
---|---|
protected Map |
f_documentation
|
protected LispValue |
f_function
|
protected boolean |
f_isExternalInPackage
|
protected boolean |
f_isSpecial
|
protected boolean |
f_mixedCase
|
protected LispString |
f_name
|
protected LispPackage |
f_package
|
protected LispValue |
f_plist
|
protected int |
f_specialCount
|
protected LispValue |
f_value
|
Fields inherited from class org.jatha.dynatype.StandardLispValue |
---|
f_lisp |
Constructor Summary | |
---|---|
StandardLispSymbol()
|
|
StandardLispSymbol(Jatha lisp,
LispString symbolNameString)
|
|
StandardLispSymbol(Jatha lisp,
String symbolName)
|
Method Summary | |
---|---|
void |
adjustSpecialCount(int amount)
|
LispValue |
apply(LispValue args)
Apply a function to an argument list. |
void |
apropos_print(PrintWriter out)
Prints information for the APROPOS function |
boolean |
basic_symbolp()
Returns Java true if the object is a symbol. |
LispValue |
boundp()
Returns T if the symbol has been assigned a value. |
LispValue |
documentation(LispValue type)
Returns the documentation string for this symbol, of the type specified. |
boolean |
equals(LispSymbol otherSymbol)
|
boolean |
externalP()
Returns true if the symbol is external in its package. |
LispValue |
fboundp()
Returns T if the symbol has an assigned function. |
LispValue |
funcall(LispValue args)
Calls a functio non a list of arguments. |
int |
get_specialCount()
|
String |
internal_getName()
Returns the Java String representing the symbol's name, without any quoting. |
void |
internal_prin1(PrintStream os)
|
void |
internal_princ(PrintStream os)
|
void |
internal_print(PrintStream os)
|
LispValue |
pop()
Pops a list and returns the first element. |
LispValue |
push(LispValue newValue)
Pushes an element onto a list and returns the list. |
void |
set_special(boolean value)
|
void |
setExternal(boolean value)
Sets whether the symbol is external in its package. |
LispValue |
setf_documentation(LispValue type,
LispValue value)
Sets the documentation string for this symbol of the type specified. |
LispValue |
setf_symbol_function(LispValue newCode)
Sets the function of a symbol. |
LispValue |
setf_symbol_plist(LispValue newPlist)
Sets the property list of a symbol. |
LispValue |
setf_symbol_value(LispValue newValue)
Sets the value of a symbol. |
void |
setPackage(LispPackage newPackage)
|
LispValue |
setq(LispValue newValue)
Assigns a value to a symbol. |
boolean |
specialP()
|
LispValue |
string()
Converts a String, Symbol or Character to a string. |
LispValue |
symbol_function()
Returns the function assigned to a symbol. |
LispValue |
symbol_name()
Returns a string containing the name of a symbol. |
LispValue |
symbol_package()
Returns the package of a symbol. |
LispValue |
symbol_plist()
Returns the property list of a symbol. |
LispValue |
symbol_value()
Returns the value of a symbol. |
LispValue |
symbolp()
Returns T if the object is a symbol. |
Object |
toJava()
Returns a Java String containing a printed representation of this symbol. |
String |
toString()
Returns this symbol as a string, including the package. |
String |
toStringSimple()
Strips or-bars from a LispSymbol name. |
LispValue |
type_of()
|
LispValue |
typep(LispValue type)
|
Methods inherited from class org.jatha.dynatype.StandardLispAtom |
---|
atom, basic_atom |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected LispValue f_function
protected LispString f_name
protected LispValue f_value
protected LispValue f_plist
protected LispPackage f_package
protected boolean f_isExternalInPackage
protected boolean f_isSpecial
protected int f_specialCount
protected boolean f_mixedCase
protected Map f_documentation
Constructor Detail |
---|
public StandardLispSymbol()
public StandardLispSymbol(Jatha lisp, String symbolName)
public StandardLispSymbol(Jatha lisp, LispString symbolNameString)
Method Detail |
---|
public boolean basic_symbolp()
LispValue
basic_symbolp
in interface LispValue
basic_symbolp
in class StandardLispValue
public boolean equals(LispSymbol otherSymbol)
public String internal_getName()
internal_getName
in interface LispValue
internal_getName
in class StandardLispValue
public void internal_prin1(PrintStream os)
internal_prin1
in interface LispValue
internal_prin1
in class StandardLispValue
public void internal_princ(PrintStream os)
internal_princ
in interface LispValue
internal_princ
in class StandardLispValue
public void internal_print(PrintStream os)
internal_print
in interface LispValue
internal_print
in class StandardLispValue
public void apropos_print(PrintWriter out)
LispValue
apropos_print
in interface LispValue
apropos_print
in class StandardLispValue
public Object toJava()
toJava
in interface LispValue
toJava
in class StandardLispValue
public String toString()
toString
in interface LispValue
toString
in class StandardLispValue
public String toStringSimple()
toStringSimple
in interface LispValue
toStringSimple
in class StandardLispValue
public void set_special(boolean value)
set_special
in interface LispValue
set_special
in class StandardLispValue
public boolean specialP()
specialP
in interface LispValue
specialP
in class StandardLispValue
public void adjustSpecialCount(int amount)
adjustSpecialCount
in interface LispValue
adjustSpecialCount
in class StandardLispValue
public int get_specialCount()
get_specialCount
in interface LispValue
get_specialCount
in class StandardLispValue
public void setPackage(LispPackage newPackage)
setPackage
in interface LispValue
setPackage
in class StandardLispValue
public void setExternal(boolean value)
LispSymbol
setExternal
in interface LispSymbol
public boolean externalP()
LispSymbol
externalP
in interface LispSymbol
public LispValue apply(LispValue args)
LispValue
apply
in interface LispValue
apply
in class StandardLispValue
public LispValue boundp()
LispValue
boundp
in interface LispValue
boundp
in class StandardLispValue
public LispValue fboundp()
LispValue
fboundp
in interface LispValue
fboundp
in class StandardLispValue
public LispValue funcall(LispValue args)
LispValue
funcall
in interface LispValue
funcall
in class StandardLispValue
public LispValue pop()
StandardLispValue
LispValue l1 = lisp.makeList(A, B); l1.pop(); // works correctly, l1 is now (B) l1.pop(); // doesn't work correctly. l1 is now (NIL . NIL)Jatha can't reassign l1 as expected.
However, the following does work:
LispValue l1 = new LispSymbol(lisp, "L1"); l1.setq(lisp.makeList(A, B)); l1.pop(); // works correctly. The value of L1 is now (B). l1.pop(); // works correctly. The value of L1 is now NIL. l1.push(A); // works correctly. The value of L1 is now (A). assert(l1.symbol_value().equal(lisp.makeList(A)) == lisp.T);
pop
in interface LispValue
pop
in class StandardLispValue
public LispValue push(LispValue newValue)
StandardLispValue
LispValue l1 = LispValue.NIL; l1.push(A); // doesn't work correctly. l1 is still NIL. l1 = l1.push(A); // works correctly.Jatha can't reassign l1 as expected.
However, the following does work:
LispValue l1 = new LispSymbol("L1"); l1.setq(LispValue.NIL); l1.push(B); // works correctly. The value of L1 is now (B). l1.push(A); // works correctly. The value of L1 is now (A B). assert(l1.symbol_value().equal(LispValueFactory.makeList(A, B)) == LispValue.T);
push
in interface LispValue
push
in class StandardLispValue
public LispValue setf_symbol_function(LispValue newCode)
LispValue
setf_symbol_function
in interface LispValue
setf_symbol_function
in class StandardLispValue
public LispValue setf_symbol_plist(LispValue newPlist)
LispValue
setf_symbol_plist
in interface LispValue
setf_symbol_plist
in class StandardLispValue
public LispValue setf_symbol_value(LispValue newValue)
LispValue
setf_symbol_value
in interface LispValue
setf_symbol_value
in class StandardLispValue
public LispValue setq(LispValue newValue)
LispValue
setq
in interface LispValue
setq
in class StandardLispValue
public LispValue string()
string
in interface LispValue
string
in class StandardLispValue
public LispValue symbolp()
LispValue
symbolp
in interface LispValue
symbolp
in class StandardLispValue
public LispValue symbol_function() throws LispException
LispValue
symbol_function
in interface LispValue
symbol_function
in class StandardLispValue
LispException
public LispValue symbol_name()
LispValue
symbol_name
in interface LispValue
symbol_name
in class StandardLispValue
public LispValue symbol_package()
LispValue
symbol_package
in interface LispValue
symbol_package
in class StandardLispValue
public LispValue symbol_plist()
LispValue
symbol_plist
in interface LispValue
symbol_plist
in class StandardLispValue
public LispValue symbol_value() throws LispException
LispValue
symbol_value
in interface LispValue
symbol_value
in class StandardLispValue
LispException
public LispValue type_of()
type_of
in interface LispValue
type_of
in class StandardLispValue
public LispValue typep(LispValue type)
typep
in interface LispValue
typep
in class StandardLispAtom
public LispValue documentation(LispValue type)
LispValue
documentation
in interface LispValue
documentation
in class StandardLispValue
type
- a symbol
public LispValue setf_documentation(LispValue type, LispValue value)
LispValue
setf_documentation
in interface LispValue
setf_documentation
in class StandardLispValue
type
- a symbolvalue
- a lispstring
|
Jatha Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |