Class LispPackage

    • Field Detail

      • exported

        public Namespace exported
        The set of exported symbols. This is one of the packages in importing.
      • CLNamespace

        public static final LispPackage CLNamespace
      • KeywordNamespace

        public static final LispPackage KeywordNamespace
      • KawaNamespace

        public static final LispPackage KawaNamespace
      • ClassNamespace

        public static final LispPackage ClassNamespace
    • Constructor Detail

      • LispPackage

        public LispPackage()
    • Method Detail

      • setExportedNamespace

        public void setExportedNamespace​(Namespace exp)
      • getShadowingSymbols

        public LList getShadowingSymbols()
      • pkgUsesList

        public static LList pkgUsesList​(LispPackage lp)
        Used for the CL PACKAGE-USE-LIST function.
      • pkgUsedByList

        public static LList pkgUsedByList​(LispPackage lp)
        Used for the CL PACKAGE-USED-BY-LIST function
      • addNickNames

        public static void addNickNames​(LispPackage name,
                                        LList nicks)
      • usePackages

        public static void usePackages​(LList importees,
                                       LispPackage importer)
      • valueOf

        public static LispPackage valueOf​(String name)
        Look up a given package in the Namespace map. This method creates a new Lisp package in the namespace if it does not already exist.
        Parameters:
        name - The name of the package to look up.
        Returns:
        The LispPackage named by name or null if a Namespace is already named by name but is not a lisp package.
      • valueOfNoCreate

        public static Namespace valueOfNoCreate​(String name)
      • exportPkg

        public static void exportPkg​(LList syms,
                                     LispPackage pkg)
        Export a list of symbols from a package, checking for conflicts.
        Parameters:
        syms - The list of symbols to export.
        pkg - The package to export the symbols from.
      • importPkg

        public static void importPkg​(LList syms,
                                     LispPackage pkg)
        Import a list of symbols into the internal table of a package. This method checks for conflicts, and should in the future allow the user to shadow import any conflicts.
        Parameters:
        syms - the list of symbols to import.
        pkg - the package to import into.
      • allSymbols

        public LList allSymbols​(Namespace ns)
        The list of symbols managed by a given namespace.
        Parameters:
        ns - The namespace whose symbol table we query
        Returns:
        The list of symbols managed by the given namespace.
      • allExternalSymbols

        public LList allExternalSymbols()
        The list of symbols exported from this package.
        Returns:
        A list of the the exported symbols from the current package.
      • allInternalSymbols

        public LList allInternalSymbols()
        The list of symbols interned into this package.
        Returns:
        A list of the interned symbols in this package.
      • lookupPresent

        public Symbol lookupPresent​(String name,
                                    int hash,
                                    boolean intern)
      • isPresent

        public boolean isPresent​(String name)
      • unintern

        public boolean unintern​(Symbol symbol)
      • shadow

        public void shadow​(String name)
        The core of the Common Lisp shadow function.
      • shadowingImport

        public void shadowingImport​(Symbol symbol)
      • keywordp

        public static boolean keywordp​(Object x)
      • symbolPackage

        public static Object symbolPackage​(Object x)
      • findPackage

        public static LispPackage findPackage​(String name)
        Returns null if no package exists.
      • signal

        public static void signal​(String msg)
        Temporary stub until Kawa supports conditional restarts.