Package ghidra.app.cmd.label
Class CreateNamespacesCmd
java.lang.Object
ghidra.app.cmd.label.CreateNamespacesCmd
This class attempts to create a namespace for each token in the provided
string. Thus, when providing a namespace string, do not include the name
of anything other than namespaces, such as the name of a symbol.
To view the assumptions for creating namespaces from a path string, see
the NamespaceUtils
class.
- Since:
- Tracker Id 619
- See Also:
-
Constructor Summary
ConstructorDescriptionCreateNamespacesCmd
(String namespacesString, Namespace parentNamespace, SourceType source) Takes a namespace string that will be parsed and the results of which will be used for creating the namespaces if they do not exist.CreateNamespacesCmd
(String namespacesString, SourceType source) Takes a namespace string that will be parsed and the results of which will be used for creating the namespaces if they do not exist. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Applies the command to the given domain object.getName()
Returns the name of this command.Returns the newly created namespace or null if one was not created.Returns the status message indicating the status of the command.
-
Constructor Details
-
CreateNamespacesCmd
Takes a namespace string that will be parsed and the results of which will be used for creating the namespaces if they do not exist.Calling this constructor is equivalent to calling:
Command command = new CreateNamespacesCmd( namespaceString, null );
- Parameters:
namespacesString
- The string to be parsed.source
- the source of the namespace- See Also:
-
CreateNamespacesCmd
Takes a namespace string that will be parsed and the results of which will be used for creating the namespaces if they do not exist.- Parameters:
namespacesString
- The string to be parsed.parentNamespace
- The namespace to be used as the starting parent of the namespaces that will be created.source
- the source of the namespace- Throws:
NullPointerException
- ifnamespaceString
isnull
.- See Also:
-
-
Method Details
-
applyTo
Description copied from interface:Command
Applies the command to the given domain object. -
getNamespace
Returns the newly created namespace or null if one was not created.- Returns:
- the newly created namespace or null if one was not created.
-
getStatusMsg
Description copied from interface:Command
Returns the status message indicating the status of the command.- Specified by:
getStatusMsg
in interfaceCommand<Program>
- Returns:
- reason for failure, or null if the status of the command was successful
-
getName
Description copied from interface:Command
Returns the name of this command.
-