| java.lang.Object tcl.lang.Namespace
Namespace | public class Namespace (Code) | | |
Inner Class :public static interface DeleteProc | |
Inner Class :static class ResolvedNsName | |
Inner Class :static class GetNamespaceForQualNameResult | |
Method Summary | |
static Object | FirstHashEntry(HashMap table) ----------------------------------------------------------------------
Tcl_FirstHashEntry -> FirstHashEntry
Return the first Object value contained in the given table.
This method is used only when taking apart a table where
entries in the table could be removed elsewhere. | static void | appendExportList(Interp interp, Namespace namespace, TclObject obj) | public static Namespace | createNamespace(Interp interp, String name, DeleteProc deleteProc) | static void | deleteImportedCmd(ImportedCmdData data) | public static void | deleteNamespace(Namespace namespace) | public static void | exportList(Interp interp, Namespace namespace, String pattern, boolean resetListFirst) | public static WrappedCommand | findCommand(Interp interp, String name, Namespace contextNs, int flags) | public static Namespace | findNamespace(Interp interp, String name, Namespace contextNs, int flags) | public static Var | findNamespaceVar(Interp interp, String name, Namespace contextNs, int flags) | static void | forgetImport(Interp interp, Namespace namespace, String pattern) | static void | free(Namespace ns) | public static Namespace | getCurrentNamespace(Interp interp) | public static Namespace | getGlobalNamespace(Interp interp) | static void | getNamespaceForQualName(Interp interp, String qualName, Namespace cxtNs, int flags, GetNamespaceForQualNameResult gnfqnr) | static Resolver | getNamespaceResolver(Namespace namespace) ----------------------------------------------------------------------
Tcl_GetNamespaceResolvers -> getNamespaceResolver
Returns the current command/variable resolution object
for a namespace. | public static WrappedCommand | getOriginalCommand(WrappedCommand command) | public static void | importList(Interp interp, Namespace namespace, String pattern, boolean allowOverwrite) | static void | invokeImportedCmd(Interp interp, ImportedCmdData data, TclObject[] objv) | public static void | popCallFrame(Interp interp) | public static void | pushCallFrame(Interp interp, CallFrame frame, Namespace namespace, boolean isProcCallFrame) | static void | resetShadowedCmdRefs(Interp interp, WrappedCommand newCmd) | public static void | setNamespaceResolver(Namespace namespace, Resolver resolver) ----------------------------------------------------------------------
Tcl_SetNamespaceResolvers -> setNamespaceResolver
Sets the command/variable resolution object for a namespace,
thereby changing the way that command/variable names are
interpreted. | static void | teardownNamespace(Namespace ns) | public String | toString() |
CREATE_NS_IF_UNKNOWN | final public static int CREATE_NS_IF_UNKNOWN(Code) | | |
FIND_ONLY_NS | final public static int FIND_ONLY_NS(Code) | | |
NS_DEAD | final static int NS_DEAD(Code) | | |
NS_DYING | final static int NS_DYING(Code) | | |
activationCount | public int activationCount(Code) | | |
deleteProc | public DeleteProc deleteProc(Code) | | |
maxExportPatterns | public int maxExportPatterns(Code) | | |
numExportPatterns | public int numExportPatterns(Code) | | |
refCount | public int refCount(Code) | | |
FirstHashEntry | static Object FirstHashEntry(HashMap table)(Code) | | ----------------------------------------------------------------------
Tcl_FirstHashEntry -> FirstHashEntry
Return the first Object value contained in the given table.
This method is used only when taking apart a table where
entries in the table could be removed elsewhere. An Iterator
is no longer valid once entries have been removed so it
is not possible to take a table apart safely with a single
iterator. This method returns null when there are no more
elements in the table, so it should not be used with a
table that contains null values. This method is not efficient,
but it is required when dealing with a Java Iterator when
the table being iterated could have elements added or deleted.
----------------------------------------------------------------------
|
deleteNamespace | public static void deleteNamespace(Namespace namespace)(Code) | | |
getNamespaceForQualName | static void getNamespaceForQualName(Interp interp, String qualName, Namespace cxtNs, int flags, GetNamespaceForQualNameResult gnfqnr)(Code) | | |
getNamespaceResolver | static Resolver getNamespaceResolver(Namespace namespace)(Code) | | ----------------------------------------------------------------------
Tcl_GetNamespaceResolvers -> getNamespaceResolver
Returns the current command/variable resolution object
for a namespace. By default, these objects are null.
New objects can be installed by calling setNamespaceResolver,
to provide new name resolution rules.
Results:
Returns the esolver object assigned to this namespace.
Returns null otherwise.
Side effects:
None.
----------------------------------------------------------------------
|
popCallFrame | public static void popCallFrame(Interp interp)(Code) | | |
setNamespaceResolver | public static void setNamespaceResolver(Namespace namespace, Resolver resolver)(Code) | | ----------------------------------------------------------------------
Tcl_SetNamespaceResolvers -> setNamespaceResolver
Sets the command/variable resolution object for a namespace,
thereby changing the way that command/variable names are
interpreted. This allows extension writers to support different
name resolution schemes, such as those for object-oriented
packages.
Command resolution is handled by the following method:
resolveCmd (Interp interp, String name,
Namespace context, int flags)
throws TclException;
Whenever a command is executed or Namespace.findCommand is invoked
within the namespace, this method is called to resolve the
command name. If this method is able to resolve the name,
it should return the corresponding WrappedCommand. Otherwise,
the procedure can return null, and the command will
be treated under the usual name resolution rules. Or, it can
throw a TclException, and the command will be considered invalid.
Variable resolution is handled by the following method:
resolveVar (Interp interp, String name,
Namespace context, int flags)
throws TclException;
If this method is able to resolve the name, it should return
the variable as Var object. The method may also
return null, and the variable will be treated under the usual
name resolution rules. Or, it can throw a TclException,
and the variable will be considered invalid.
Results:
See above.
Side effects:
None.
----------------------------------------------------------------------
|
|
|