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
FieldsModifier and TypeFieldDescriptionstatic final StringGlobal 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBody()Get the address set for this namespace.longgetID()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.booleanReturns true if this namespace is external (i.e., associated with a Library)voidsetParentNamespace(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, waitMethods 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:NamespaceGet the symbol for this namespace. -
getName
Description copied from interface:NamespaceGet the name of the symbol for this scope -
getID
public long getID()Description copied from interface:NamespaceReturn the namespace id -
getParentNamespace
Description copied from interface:NamespaceGet the parent scope.- Specified by:
getParentNamespacein interfaceNamespace- Returns:
- null if this scope is the global scope.
- See Also:
-
getBody
Description copied from interface:NamespaceGet 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:NamespaceReturns the fully qualified name -
setParentNamespace
public void setParentNamespace(Namespace parentNamespace) throws DuplicateNameException, InvalidInputException Description copied from interface:NamespaceSet the parent namespace for this namespace. Restrictions may apply.- Specified by:
setParentNamespacein 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:NamespaceReturns true if this namespace is external (i.e., associated with a Library)- Specified by:
isExternalin interfaceNamespace- Returns:
- true if this namespace is external (i.e., associated with a Library)
-