|
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.StandardLispPackage
public class StandardLispPackage
An implementation of ANSI Common LISP packages, including defpackage, export, import, etc.
Jatha
Field Summary | |
---|---|
protected LispValue |
f_name
The LISP string giving the name of the package. |
protected LispValue |
f_nicknames
|
protected SymbolTable |
f_shadowingSymbols
The shadowing symbols of this package. |
protected SymbolTable |
f_symbolTable
SYMTAB is the local symbol table for this package. |
protected LispValue |
f_uses
|
Fields inherited from class org.jatha.dynatype.StandardLispValue |
---|
f_lisp |
Constructor Summary | |
---|---|
StandardLispPackage()
|
|
StandardLispPackage(Jatha lisp,
LispValue name)
Creates a new package. |
|
StandardLispPackage(Jatha lisp,
LispValue name,
LispValue nicknames)
Creates a package with a list of nicknames. |
|
StandardLispPackage(Jatha lisp,
LispValue name,
LispValue nicknames,
LispValue usesList)
|
|
StandardLispPackage(Jatha lisp,
LispValue pname,
LispValue pnicknames,
LispValue puses,
SymbolTable symtab)
Creates a package with a list of nicknames and a list of exported symbols. |
|
StandardLispPackage(Jatha lisp,
LispValue pname,
LispValue pnicknames,
LispValue puses,
SymbolTable symtab,
SymbolTable shadows)
Creates a package with a list of nicknames and a list of exported symbols. |
|
StandardLispPackage(Jatha lisp,
String name)
Creates a new package. |
Method Summary | |
---|---|
LispValue |
addSymbol(LispString name,
LispValue symbol)
Stores a new symbol in this package. |
LispValue |
export(LispValue symbols)
Declares the symbol or symbols as exported symbols. |
private LispString |
getAsString(LispValue inp)
|
LispValue |
getExternalSymbol(LispString str)
Returns the external symbol with the given name |
LispString |
getName()
Returns the name of this package as a LispString. |
LispValue |
getNicknames()
Returns a list of the nicknames of this package. |
LispValue |
getSymbol(LispString str)
Returns the symbol with the given name. |
SymbolTable |
getSymbolTable()
Returns the symbol table for this package. |
LispValue |
getUses()
Returns a list of package names that this package uses. |
void |
internal_prin1(PrintStream os)
|
void |
internal_princ(PrintStream os)
|
void |
internal_print(PrintStream os)
|
LispValue |
lisp_import(LispValue symbols)
Imports the given symbols into the current package. |
(package private) LispValue |
makeSymbolsFromList(LispValue symbolList)
|
void |
setNicknames(LispValue nicknames)
Sets the nicknames-list |
void |
setUses(LispValue uses)
Sets the uses for this package. |
LispValue |
shadow(LispValue symbols)
|
LispValue |
shadowing_import(LispValue symbols)
Imports the given symbols into the current package shadowing list. |
String |
toString()
toString() returns a printed representation
of the form (as printed by (prin1) ) in
a Java string. |
private LispValue |
transformToStrings(LispValue list)
|
LispValue |
type_of()
|
LispValue |
typep(LispValue type)
|
boolean |
uses(LispValue pkg)
Returns true if this package uses the given package |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SymbolTable f_symbolTable
protected SymbolTable f_shadowingSymbols
protected LispValue f_name
protected LispValue f_nicknames
protected LispValue f_uses
Constructor Detail |
---|
public StandardLispPackage()
public StandardLispPackage(Jatha lisp, String name)
name
- - a string giving the name of the new packagepublic StandardLispPackage(Jatha lisp, LispValue name)
name
- - a LISP string giving the name of the packagepublic StandardLispPackage(Jatha lisp, LispValue name, LispValue nicknames)
name
- - a LISP string giving the name.nicknames
- - a LISP list of nicknames (all strings)public StandardLispPackage(Jatha lisp, LispValue name, LispValue nicknames, LispValue usesList)
public StandardLispPackage(Jatha lisp, LispValue pname, LispValue pnicknames, LispValue puses, SymbolTable symtab)
pname
- a LISP string giving the name.pnicknames
- a LISP list of nicknames (all strings)puses
- a LISP list of exported symbols (all strings)symtab
- a symbol table to use for this package.public StandardLispPackage(Jatha lisp, LispValue pname, LispValue pnicknames, LispValue puses, SymbolTable symtab, SymbolTable shadows)
pname
- a LISP string giving the name.pnicknames
- a LISP list of nicknames (all strings)puses
- a LISP list of exported symbols (all strings)symtab
- a symbol table to use for this package.shadows
- a shadowing symbol table to use for this package.Method Detail |
---|
public SymbolTable getSymbolTable()
LispPackage
getSymbolTable
in interface LispPackage
public void internal_princ(PrintStream os)
internal_princ
in interface LispValue
internal_princ
in class StandardLispValue
public void internal_prin1(PrintStream os)
internal_prin1
in interface LispValue
internal_prin1
in class StandardLispValue
public void internal_print(PrintStream os)
internal_print
in interface LispValue
internal_print
in class StandardLispValue
public String toString()
StandardLispValue
toString()
returns a printed representation
of the form (as printed by (prin1)
) in
a Java string.
toString
in interface LispValue
toString
in class StandardLispValue
private LispValue transformToStrings(LispValue list)
private LispString getAsString(LispValue inp)
public LispValue getExternalSymbol(LispString str)
LispPackage
getExternalSymbol
in interface LispPackage
str
- a LispString corresponding to the symbol.public LispValue addSymbol(LispString name, LispValue symbol)
addSymbol
in interface LispPackage
public LispValue getSymbol(LispString str)
LispPackage
getSymbol
in interface LispPackage
LispValue makeSymbolsFromList(LispValue symbolList)
public LispValue export(LispValue symbols)
export
in interface LispPackage
public LispValue lisp_import(LispValue symbols)
public LispValue shadowing_import(LispValue symbols)
public LispValue shadow(LispValue symbols)
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 StandardLispValue
public LispString getName()
LispPackage
getName
in interface LispPackage
public LispValue getNicknames()
getNicknames
in interface LispPackage
public void setNicknames(LispValue nicknames)
setNicknames
in interface LispPackage
public LispValue getUses()
LispPackage
getUses
in interface LispPackage
public void setUses(LispValue uses)
LispPackage
setUses
in interface LispPackage
uses
- the uses of this packagepublic boolean uses(LispValue pkg)
uses
in interface LispValue
uses
in class StandardLispValue
|
Jatha Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |