Package ghidra.app.util.demangler
Interface Demangled
-
- All Known Implementing Classes:
AbstractDemangledFunctionDefinitionDataType
,DemangledAddressTable
,DemangledDataType
,DemangledFunction
,DemangledFunctionIndirect
,DemangledFunctionPointer
,DemangledFunctionReference
,DemangledLambda
,DemangledObject
,DemangledString
,DemangledThunk
,DemangledType
,DemangledUnknown
,DemangledVariable
public interface Demangled
A unifying top-level interface for allDemangledObject
s andDemangledType
sThis class and its children have many overlapping concepts that we wish to refine at a future date. Below is a listing of known uses:
Method Description getName()
A 'safe' name that is the getDemangledName()
, but with some characters changed to be valid for use within Ghidra.getDemangledName()
The unmodified name that was set upon this object. getNamespaceName()
The 'safe' name of this object when it is used as a namespace name. This usually has parameter and template information. Further, some characters within templates and function signatures are replaced, such as spaces and namespace separators. Given this full demangled string:
Foo::Bar::Baz<int>
, this method will returnBaz<int>
.getNamespaceString()
This returns the unmodified name of this item, along with any unmodified parent namespace names, all separated by a namespace delimiter. Unlike getNamespaceName()
, the spaces and internal namespace tokens will not be replaced.Given this full demangled string:
Foo::Bar::Baz<int>
, this method will returnFoo::Bar::Baz<int>
.getSignature()
Returns the complete string form of this object, with most known attributes. For functions, this will be a complete signature. getOriginalDemangled()
The original unmodified demangled string. This is the full demangled string returned from the demangling service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDemangledName()
Returns the unmodified demangled name of this object.java.lang.String
getMangledString()
Returns the original mangled stringjava.lang.String
getName()
Returns the demangled name of this object.Demangled
getNamespace()
Returns the namespace containing this demangled objectjava.lang.String
getNamespaceName()
Returns this object's namespace name without the fully-qualified parent path.java.lang.String
getNamespaceString()
Returns a representation of this object as fully-qualified namespace.java.lang.String
getOriginalDemangled()
Returns the original demangled string returned by the demangling servicejava.lang.String
getSignature()
Generates a complete representation of this object to include all know attributes of this objectvoid
setName(java.lang.String name)
Sets the name for this objectvoid
setNamespace(Demangled ns)
Sets the namespace of this demangled object
-
-
-
Method Detail
-
getMangledString
java.lang.String getMangledString()
Returns the original mangled string- Returns:
- the string
-
getOriginalDemangled
java.lang.String getOriginalDemangled()
Returns the original demangled string returned by the demangling service- Returns:
- the original demangled string
-
getName
java.lang.String getName()
Returns the demangled name of this object. NOTE: unsupported symbol characters, like whitespace, will be converted to an underscore.- Returns:
- name of this DemangledObject with unsupported characters converted to underscore
- See Also:
getDemangledName()
-
setName
void setName(java.lang.String name)
Sets the name for this object- Parameters:
name
- the name
-
getDemangledName
java.lang.String getDemangledName()
Returns the unmodified demangled name of this object. This name may contain whitespace and other characters not supported for symbol or data type creation. SeegetName()
for the same name modified for use within Ghidra.- Returns:
- name of this DemangledObject
-
getNamespace
Demangled getNamespace()
Returns the namespace containing this demangled object- Returns:
- the namespace containing this demangled object
-
setNamespace
void setNamespace(Demangled ns)
Sets the namespace of this demangled object- Parameters:
ns
- the namespace
-
getNamespaceString
java.lang.String getNamespaceString()
Returns a representation of this object as fully-qualified namespace. The value returned here may have had some special characters replaced, such as ' ' replaced with '_' and '::' replaced with '--'.- Returns:
- the full namespace
-
getNamespaceName
java.lang.String getNamespaceName()
Returns this object's namespace name without the fully-qualified parent path. The value returned here may have had some special characters replaced, such as ' ' replaced with '_' and '::' replaced with '--'.- Returns:
- the name
-
getSignature
java.lang.String getSignature()
Generates a complete representation of this object to include all know attributes of this object- Returns:
- the signature
-
-