public class LispPackage extends Namespace
Modifier and Type | Field and Description |
---|---|
static LispPackage |
ClassNamespace |
static LispPackage |
CLNamespace |
static ThreadLocation<LispPackage> |
currentPackage
Common Lisp
*package* special. |
Namespace |
exported
The set of exported symbols.
|
static LispPackage |
KawaNamespace |
static LispPackage |
KeywordNamespace |
EmptyNamespace, nsTable, prefix, UNKNOWN_NAMESPACE
DEFAULT_INITIAL_SIZE, mask, num_bindings, table
Constructor and Description |
---|
LispPackage() |
Modifier and Type | Method and Description |
---|---|
static void |
addNickNames(LispPackage name,
LList nicks) |
LList |
allExternalSymbols()
The list of symbols exported from this package.
|
LList |
allInternalSymbols()
The list of symbols interned into this package.
|
LList |
allSymbols(Namespace ns)
The list of symbols managed by a given namespace.
|
static void |
exportPkg(LList syms,
LispPackage pkg)
Export a list of symbols from a package, checking for conflicts.
|
static LispPackage |
findPackage(java.lang.String name)
Returns null if no package exists.
|
Values.Values2 |
findSymbol(java.lang.Object name) |
LList |
getShadowingSymbols() |
static void |
importPkg(LList syms,
LispPackage pkg)
Import a list of symbols into the internal table of a package.
|
static java.lang.Object |
intern(java.lang.String name,
LispPackage pkg) |
boolean |
isPresent(java.lang.String name) |
static boolean |
keywordp(java.lang.Object x) |
Symbol |
lookup(java.lang.String name,
int hash,
boolean create) |
Symbol |
lookupPresent(java.lang.String name,
int hash,
boolean intern) |
static LispPackage |
makeLispPackage(java.lang.Object name,
LList nicks,
LList used) |
static LList |
pkgUsedByList(LispPackage lp)
Used for the CL PACKAGE-USED-BY-LIST function
|
static LList |
pkgUsesList(LispPackage lp)
Used for the CL PACKAGE-USE-LIST function.
|
void |
setExportedNamespace(Namespace exp) |
void |
shadow(java.lang.String name)
The core of the Common Lisp shadow function.
|
void |
shadowingImport(Symbol symbol) |
static void |
signal(java.lang.String msg)
Temporary stub until Kawa supports conditional restarts.
|
static java.lang.Object |
symbolPackage(java.lang.Object x) |
boolean |
unintern(Symbol symbol) |
static void |
use(LispPackage importing,
LispPackage imported) |
static void |
usePackages(LList importees,
LispPackage importer) |
static LispPackage |
valueOf(java.lang.String name)
Look up a given package in the
Namespace map. |
static Namespace |
valueOfNoCreate(java.lang.String name) |
add, allocEntries, create, create, get, get, getDefault, getDefaultSymbol, getEntryHashCode, getEntryNext, getName, getPrefix, getSymbol, isConstant, isUnknownNamespace, lookup, lookupInternal, makeEntry, makeUnknownNamespace, readExternal, readResolve, remove, setEntryNext, setName, toString, valueOf, valueOf, valueOf, writeExternal
clear, entrySet, get, getNode, getOrDefault, hash, hashToIndex, matches, matches, put, put, rehash, remove, size
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, values
public Namespace exported
public static final LispPackage CLNamespace
public static final LispPackage KeywordNamespace
public static final LispPackage KawaNamespace
public static final LispPackage ClassNamespace
public static ThreadLocation<LispPackage> currentPackage
*package*
special.public void setExportedNamespace(Namespace exp)
public LList getShadowingSymbols()
public static LList pkgUsesList(LispPackage lp)
public static LList pkgUsedByList(LispPackage lp)
public static void addNickNames(LispPackage name, LList nicks)
public static void usePackages(LList importees, LispPackage importer)
public static LispPackage makeLispPackage(java.lang.Object name, LList nicks, LList used)
public static LispPackage valueOf(java.lang.String name)
Namespace
map.
This method creates a new Lisp package in the namespace if it does not
already exist.name
- The name of the package to look up.LispPackage
named by name
or null
if a
Namespace
is already named by name
but is not a lisp
package.public static Namespace valueOfNoCreate(java.lang.String name)
public Values.Values2 findSymbol(java.lang.Object name)
public static void exportPkg(LList syms, LispPackage pkg)
syms
- The list of symbols to export.pkg
- The package to export the symbols from.public static void importPkg(LList syms, LispPackage pkg)
syms
- the list of symbols to import.pkg
- the package to import into.public LList allSymbols(Namespace ns)
ns
- The namespace whose symbol table we querypublic LList allExternalSymbols()
public LList allInternalSymbols()
public static void use(LispPackage importing, LispPackage imported)
public Symbol lookup(java.lang.String name, int hash, boolean create)
public Symbol lookupPresent(java.lang.String name, int hash, boolean intern)
public boolean isPresent(java.lang.String name)
public boolean unintern(Symbol symbol)
public void shadow(java.lang.String name)
public void shadowingImport(Symbol symbol)
public static boolean keywordp(java.lang.Object x)
public static java.lang.Object symbolPackage(java.lang.Object x)
public static java.lang.Object intern(java.lang.String name, LispPackage pkg)
public static LispPackage findPackage(java.lang.String name)
public static void signal(java.lang.String msg)