Package ghidra.app.util.demangler
Class AbstractDemangledFunctionDefinitionDataType
- java.lang.Object
 - 
- ghidra.app.util.demangler.DemangledType
 - 
- ghidra.app.util.demangler.DemangledDataType
 - 
- ghidra.app.util.demangler.AbstractDemangledFunctionDefinitionDataType
 
 
 
 
- 
- All Implemented Interfaces:
 Demangled
- Direct Known Subclasses:
 DemangledFunctionIndirect,DemangledFunctionPointer,DemangledFunctionReference
public abstract class AbstractDemangledFunctionDefinitionDataType extends DemangledDataType
Parent base class for types that represent things that refer to functions 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcallingConventionprotected static java.lang.StringDEFAULT_NAME_PREFIXprotected static java.lang.StringEMPTY_STRINGprotected static intIDprotected booleanisConstPointerprotected booleanisTrailingPointer64protected booleanisTrailingRestrictprotected booleanisTrailingUnalignedprotected java.lang.Stringmodifierprotected java.util.List<DemangledDataType>parametersprotected java.lang.StringparentNameprotected DemangledDataTypereturnType- 
Fields inherited from class ghidra.app.util.demangler.DemangledDataType
ARR_NOTATION, BOOL, CHAR, CLASS, COCLASS, COINTERFACE, COMPLEX, CONST, DOUBLE, ENUM, FLOAT, FLOAT128, INT, INT0_T, INT128, INT16, INT32, INT64, INT8, LONG, LONG_DOUBLE, LONG_LONG, PRIMITIVES, PTR_NOTATION, PTR64, REF_NOTATION, RESTRICT, SHORT, SIGNED, SPACE, STRING, STRUCT, UNALIGNED, UNDEFINED, UNION, UNSIGNED, VARARGS, VOID, VOLATILE, WCHAR_T 
- 
Fields inherited from class ghidra.app.util.demangler.DemangledType
mangled, namespace, template 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddFunctionPointerParens(java.lang.StringBuilder buffer, java.lang.String s)voidaddParameter(DemangledDataType parameter)Adds a parameters to the end of the parameter list for this demangled functionprotected voidaddParentName(java.lang.StringBuilder buffer)java.lang.StringgetCallingConvention()Returns the calling convention or null, if unspecifiedprotected java.lang.StringgetConventionPointerNameString(java.lang.String name)DataTypegetDataType(DataTypeManager dataTypeManager)Converts this demangled datatype into the corresponding Ghidra datatypejava.util.List<DemangledDataType>getParameters()Returns a list of the parameters for this demangled functions.DemangledDataTypegetReturnType()Returns the return typejava.lang.StringgetSignature()Generates a complete representation of this object to include all know attributes of this objectprotected abstract java.lang.StringgetTypeString()Returns the string for this type of reference (e.g., * or &)booleanisConstPointer()booleanisTrailingPointer64()booleanisTrailingRestrict()booleanisTrailingUnaligned()voidsetCallingConvention(java.lang.String callingConvention)Sets the function calling convention.voidsetConstPointer()voidsetModifier(java.lang.String modifier)Sets the function __ modifier.voidsetReturnType(DemangledDataType returnType)Sets the return typevoidsetTrailingPointer64()voidsetTrailingRestrict()voidsetTrailingUnaligned()java.lang.StringtoSignature(java.lang.String name)- 
Methods inherited from class ghidra.app.util.demangler.DemangledDataType
getArrayDimensions, getBasedName, getMemberScope, getPointerLevels, incrementPointerLevels, isArray, isClass, isCoclass, isCointerface, isComplex, isEnum, isPointer, isPointer64, isPrimitive, isReference, isRestrict, isSigned, isStruct, isTemplate, isUnaligned, isUnion, isUnsigned, isVarArgs, isVoid, setArray, setBasedName, setClass, setCoclass, setCointerface, setComplex, setEnum, setEnumType, setEnumType, setMemberScope, setPointer64, setReference, setRestrict, setRValueReference, setSigned, setStruct, setTemplate, setUnaligned, setUnion, setUnsigned, setVarArgs, toString 
- 
Methods inherited from class ghidra.app.util.demangler.DemangledType
getDemangledName, getMangledString, getName, getNamespace, getNamespaceName, getNamespaceString, getOriginalDemangled, getTemplate, isConst, isVolatile, setConst, setName, setNamespace, setTemplate, setVolatile 
 - 
 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_NAME_PREFIX
protected static final java.lang.String DEFAULT_NAME_PREFIX
- See Also:
 - Constant Field Values
 
 
- 
EMPTY_STRING
protected static final java.lang.String EMPTY_STRING
- See Also:
 - Constant Field Values
 
 
- 
ID
protected static int ID
 
- 
returnType
protected DemangledDataType returnType
 
- 
callingConvention
protected java.lang.String callingConvention
 
- 
parameters
protected java.util.List<DemangledDataType> parameters
 
- 
modifier
protected java.lang.String modifier
 
- 
isConstPointer
protected boolean isConstPointer
 
- 
parentName
protected java.lang.String parentName
 
- 
isTrailingPointer64
protected boolean isTrailingPointer64
 
- 
isTrailingUnaligned
protected boolean isTrailingUnaligned
 
- 
isTrailingRestrict
protected boolean isTrailingRestrict
 
 - 
 
- 
Method Detail
- 
getTypeString
protected abstract java.lang.String getTypeString()
Returns the string for this type of reference (e.g., * or &)- Returns:
 - the string
 
 
- 
getSignature
public java.lang.String getSignature()
Description copied from interface:DemangledGenerates a complete representation of this object to include all know attributes of this object- Specified by:
 getSignaturein interfaceDemangled- Overrides:
 getSignaturein classDemangledDataType- Returns:
 - the signature
 
 
- 
setReturnType
public void setReturnType(DemangledDataType returnType)
Sets the return type- Parameters:
 returnType- the return type
 
- 
getReturnType
public DemangledDataType getReturnType()
Returns the return type- Returns:
 - the return type
 
 
- 
setCallingConvention
public void setCallingConvention(java.lang.String callingConvention)
Sets the function calling convention. For example, "__cdecl"- Parameters:
 callingConvention- the function calling convention
 
- 
getCallingConvention
public java.lang.String getCallingConvention()
Returns the calling convention or null, if unspecified- Returns:
 - the calling convention or null, if unspecified
 
 
- 
setModifier
public void setModifier(java.lang.String modifier)
Sets the function __ modifier. For example, "namespace::".- Parameters:
 modifier- the function modifier
 
- 
isConstPointer
public boolean isConstPointer()
 
- 
setConstPointer
public void setConstPointer()
 
- 
isTrailingPointer64
public boolean isTrailingPointer64()
 
- 
setTrailingPointer64
public void setTrailingPointer64()
 
- 
isTrailingUnaligned
public boolean isTrailingUnaligned()
 
- 
setTrailingUnaligned
public void setTrailingUnaligned()
 
- 
isTrailingRestrict
public boolean isTrailingRestrict()
 
- 
setTrailingRestrict
public void setTrailingRestrict()
 
- 
addParameter
public void addParameter(DemangledDataType parameter)
Adds a parameters to the end of the parameter list for this demangled function- Parameters:
 parameter- the new parameter to add
 
- 
getParameters
public java.util.List<DemangledDataType> getParameters()
Returns a list of the parameters for this demangled functions.- Returns:
 - a list of the parameters for this demangled functions
 
 
- 
toSignature
public java.lang.String toSignature(java.lang.String name)
 
- 
getConventionPointerNameString
protected java.lang.String getConventionPointerNameString(java.lang.String name)
 
- 
addFunctionPointerParens
protected void addFunctionPointerParens(java.lang.StringBuilder buffer, java.lang.String s) 
- 
addParentName
protected void addParentName(java.lang.StringBuilder buffer)
 
- 
getDataType
public DataType getDataType(DataTypeManager dataTypeManager)
Description copied from class:DemangledDataTypeConverts this demangled datatype into the corresponding Ghidra datatype- Overrides:
 getDataTypein classDemangledDataType- Parameters:
 dataTypeManager- the manager to search and whose data organization should be used- Returns:
 - the Ghidra datatype corresponding to the demangled datatype
 
 
 - 
 
 -