Package ghidra.program.model.address
Class GlobalNamespace
java.lang.Object
ghidra.program.model.address.GlobalNamespace
- All Implemented Interfaces:
Namespace
The global namespace implementation class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Global namespace name which may (incorrectly) appear as the first element within a namespace path (e.g.,Global::Foo::Bar
).Fields inherited from interface ghidra.program.model.symbol.Namespace
DELIMITER, GLOBAL_NAMESPACE_ID, NAMESPACE_DELIMITER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getBody()
Get the address set for this namespace.long
getID()
Return the namespace idgetName()
Get the name of the symbol for this scopegetName
(boolean includeNamespacePath) Returns the fully qualified nameGet the parent scope.Get the symbol for this namespace.boolean
Returns true if this namespace is external (i.e., associated with a Library)void
setParentNamespace
(Namespace parentNamespace) Set the parent namespace for this namespace.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.program.model.symbol.Namespace
getPathList, isGlobal, isLibrary
-
Field Details
-
GLOBAL_NAMESPACE_NAME
Global namespace name which may (incorrectly) appear as the first element within a namespace path (e.g.,Global::Foo::Bar
). It is preferred that the Global namespace be omitted in favor ofFoo::Bar
.- See Also:
-
-
Constructor Details
-
GlobalNamespace
Constructs a new GlobalNamespace- Parameters:
memory
- the memory associated with this global namespace
-
-
Method Details
-
getSymbol
Description copied from interface:Namespace
Get the symbol for this namespace. -
getName
Description copied from interface:Namespace
Get the name of the symbol for this scope -
getID
public long getID()Description copied from interface:Namespace
Return the namespace id -
getParentNamespace
Description copied from interface:Namespace
Get the parent scope.- Specified by:
getParentNamespace
in interfaceNamespace
- Returns:
- null if this scope is the global scope.
- See Also:
-
getBody
Description copied from interface:Namespace
Get the address set for this namespace. Note: The body of a namespace (currently only used by the function namespace) is restricted it Integer.MAX_VALUE. -
toString
-
equals
-
getName
Description copied from interface:Namespace
Returns the fully qualified name -
setParentNamespace
public void setParentNamespace(Namespace parentNamespace) throws DuplicateNameException, InvalidInputException Description copied from interface:Namespace
Set the parent namespace for this namespace. Restrictions may apply.- Specified by:
setParentNamespace
in interfaceNamespace
- Parameters:
parentNamespace
- the namespace to use as this namespace's parent.- Throws:
DuplicateNameException
- if another symbol exists in the parent namespace with the same name as this namespaceInvalidInputException
- if the parent namespace is not applicable for this namespace.- See Also:
-
isExternal
public boolean isExternal()Description copied from interface:Namespace
Returns true if this namespace is external (i.e., associated with a Library)- Specified by:
isExternal
in interfaceNamespace
- Returns:
- true if this namespace is external (i.e., associated with a Library)
-