Package ghidra.app.util.demangler
Class DemangledType
- java.lang.Object
-
- ghidra.app.util.demangler.DemangledType
-
- All Implemented Interfaces:
Demangled
- Direct Known Subclasses:
DemangledDataType
public class DemangledType extends java.lang.Object implements Demangled
Represents a demangled string. This class is really just a placeholder for demangled information. SeeDemangledObject
for a class that represents software concepts that can be applied to a program. TheDemangledObject
may use instances of this class to compose its internal state for namespace information, return types and parameters.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
mangled
protected Demangled
namespace
protected DemangledTemplate
template
-
Constructor Summary
Constructors Constructor Description DemangledType(java.lang.String mangled, java.lang.String originaDemangled, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete 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 objectDemangledTemplate
getTemplate()
boolean
isConst()
boolean
isVolatile()
void
setConst()
void
setName(java.lang.String name)
Sets the name for this objectvoid
setNamespace(Demangled namespace)
Sets the namespace of this demangled objectvoid
setTemplate(DemangledTemplate template)
void
setVolatile()
java.lang.String
toString()
-
-
-
Field Detail
-
mangled
protected java.lang.String mangled
-
namespace
protected Demangled namespace
-
template
protected DemangledTemplate template
-
-
Method Detail
-
getDemangledName
public java.lang.String getDemangledName()
Description copied from interface:Demangled
Returns the unmodified demangled name of this object. This name may contain whitespace and other characters not supported for symbol or data type creation. SeeDemangled.getName()
for the same name modified for use within Ghidra.- Specified by:
getDemangledName
in interfaceDemangled
- Returns:
- name of this DemangledObject
-
getName
public java.lang.String getName()
Description copied from interface:Demangled
Returns the demangled name of this object. NOTE: unsupported symbol characters, like whitespace, will be converted to an underscore.- Specified by:
getName
in interfaceDemangled
- Returns:
- name of this DemangledObject with unsupported characters converted to underscore
- See Also:
Demangled.getDemangledName()
-
setName
public void setName(java.lang.String name)
Description copied from interface:Demangled
Sets the name for this object
-
getOriginalDemangled
public java.lang.String getOriginalDemangled()
Description copied from interface:Demangled
Returns the original demangled string returned by the demangling service- Specified by:
getOriginalDemangled
in interfaceDemangled
- Returns:
- the original demangled string
-
getMangledString
public java.lang.String getMangledString()
Description copied from interface:Demangled
Returns the original mangled string- Specified by:
getMangledString
in interfaceDemangled
- Returns:
- the string
-
isConst
public boolean isConst()
-
setConst
public void setConst()
-
isVolatile
public boolean isVolatile()
-
setVolatile
public void setVolatile()
-
getNamespace
public Demangled getNamespace()
Description copied from interface:Demangled
Returns the namespace containing this demangled object- Specified by:
getNamespace
in interfaceDemangled
- Returns:
- the namespace containing this demangled object
-
setNamespace
public void setNamespace(Demangled namespace)
Description copied from interface:Demangled
Sets the namespace of this demangled object- Specified by:
setNamespace
in interfaceDemangled
- Parameters:
namespace
- the namespace
-
getTemplate
public DemangledTemplate getTemplate()
-
setTemplate
public void setTemplate(DemangledTemplate template)
-
getSignature
public java.lang.String getSignature()
Description copied from interface:Demangled
Generates a complete representation of this object to include all know attributes of this object- Specified by:
getSignature
in interfaceDemangled
- Returns:
- the signature
-
getNamespaceString
public java.lang.String getNamespaceString()
Description copied from interface:Demangled
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 '--'.- Specified by:
getNamespaceString
in interfaceDemangled
- Returns:
- the full namespace
-
getNamespaceName
public java.lang.String getNamespaceName()
Description copied from interface:Demangled
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 '--'.- Specified by:
getNamespaceName
in interfaceDemangled
- Returns:
- the name
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-