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 Details

    • DEFAULT_NAME_PREFIX

      protected static final String DEFAULT_NAME_PREFIX
      See Also:
    • EMPTY_STRING

      protected static final String EMPTY_STRING
      See Also:
    • ID

      protected static int ID
    • returnType

      protected DemangledDataType returnType
    • callingConvention

      protected String callingConvention
    • parameters

      protected List<DemangledDataType> parameters
    • modifier

      protected String modifier
    • isConstPointer

      protected boolean isConstPointer
    • parentName

      protected String parentName
    • isTrailingPointer64

      protected boolean isTrailingPointer64
    • isTrailingUnaligned

      protected boolean isTrailingUnaligned
    • isTrailingRestrict

      protected boolean isTrailingRestrict
  • Method Details

    • getTypeString

      protected abstract String getTypeString()
      Returns the string for this type of reference (e.g., * or &)
      Returns:
      the string
    • getSignature

      public 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 interface Demangled
      Overrides:
      getSignature in class DemangledDataType
      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(String callingConvention)
      Sets the function calling convention. For example, "__cdecl"
      Parameters:
      callingConvention - the function calling convention
    • getCallingConvention

      public String getCallingConvention()
      Returns the calling convention or null, if unspecified
      Returns:
      the calling convention or null, if unspecified
    • setModifier

      public void setModifier(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 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 String toSignature(String name)
    • getConventionPointerNameString

      protected String getConventionPointerNameString(String name)
    • addFunctionPointerParens

      protected void addFunctionPointerParens(StringBuilder buffer, String s)
    • addParentName

      protected void addParentName(StringBuilder buffer)
    • getDataType

      public DataType getDataType(DataTypeManager dataTypeManager)
      Description copied from class: DemangledDataType
      Converts this demangled datatype into the corresponding Ghidra datatype
      Overrides:
      getDataType in class DemangledDataType
      Parameters:
      dataTypeManager - the manager to search and whose data organization should be used
      Returns:
      the Ghidra datatype corresponding to the demangled datatype