Class TargetClassDescriptor
java.lang.Object
ghidra.app.util.bin.format.swift.SwiftTypeMetadataStructure
ghidra.app.util.bin.format.swift.types.TargetContextDescriptor
ghidra.app.util.bin.format.swift.types.TargetTypeContextDescriptor
ghidra.app.util.bin.format.swift.types.TargetClassDescriptor
- All Implemented Interfaces:
StructConverter
Represents a Swift
TargetClassDescriptor structure- See Also:
-
Field Summary
Fields inherited from class ghidra.app.util.bin.format.swift.types.TargetContextDescriptor
flags, SIZEFields inherited from class ghidra.app.util.bin.format.swift.SwiftTypeMetadataStructure
CATEGORY, CATEGORY_PATH -
Constructor Summary
ConstructorsConstructorDescriptionTargetClassDescriptor(BinaryReader reader) Creates a newTargetClassDescriptor -
Method Summary
Modifier and TypeMethodDescriptionReturns a short description of theSwiftTypeMetadataStructure.Returns flags used to do things like indicate the presence of an Objective-C resilient class stub if this descriptor has a resilient superclass; otherwise,null.intReturns the offset of the field offset vector for this class's stored properties in its metadata, in words (0 means there is no field offset vector).Returns theTargetTypeGenericContextDescriptorHeader, ornullif it doesn't exist.Returns theInvertibleProtocolSet, ornullif it doens't exist.intReturns the negative size of metadata objects of this class (in words) if this descriptor does not have a resilient superclass.intReturns the positive size of metadata objects of this class (in words) if this descriptor does not have a resilient superclass.Returns theListof method descriptors.Returns theListof method override descriptors.intReturns the number of stored properties in the class, not including its superclasses.intReturns the number of additional members added by this class to the class metadata.Returns theTargetObjCResilientClassStubInfo, ornullif it doesn't exist.intReturns a reference to a cache holding the metadata's extents if this descriptor has a resilient superclass; otherwise, 0.Returns theTargetResilientSuperclass, ornullif it doesn't exist.Returns the name of theSwiftTypeMetadataStructure.intReturns the type of the superclass, expressed as a mangled type name that can refer to the generic arguments of the subclass type.Returns theTargetForeignMetadataInitialization, ornullif it doesn't exist.Returns theTargetOverrideTableHeader, ornullif it doesn't exist.Returns theTargetSingletonMetadataInitialization, ornullif it doesn't exist.Returns theTargetVTableDescriptorHeader, ornullif it doesn't exist.Returns a structure datatype representing the contents of the implementor of this interface.Methods inherited from class ghidra.app.util.bin.format.swift.types.TargetTypeContextDescriptor
getAccessFunctionPtr, getFieldDescriptor, getFields, getName, toStringMethods inherited from class ghidra.app.util.bin.format.swift.types.TargetContextDescriptor
getFlags, getParentMethods inherited from class ghidra.app.util.bin.format.swift.SwiftTypeMetadataStructure
getBase
-
Constructor Details
-
TargetClassDescriptor
Creates a newTargetClassDescriptor- Parameters:
reader- ABinaryReaderpositioned at the start of the structure- Throws:
IOException- if there was an IO-related problem creating the structure
-
-
Method Details
-
getSuperclassType
public int getSuperclassType()Returns the type of the superclass, expressed as a mangled type name that can refer to the generic arguments of the subclass type.- Returns:
- the type of the superclass, expressed as a mangled type name that can refer to the generic arguments of the subclass type
-
getResilientMetadataBounds
public int getResilientMetadataBounds()Returns a reference to a cache holding the metadata's extents if this descriptor has a resilient superclass; otherwise, 0.- Returns:
- a reference to a cache holding the metadata's extents if this descriptor has a resilient superclass; otherwise, 0
-
getMetadataNegativeSizeInWords
public int getMetadataNegativeSizeInWords()Returns the negative size of metadata objects of this class (in words) if this descriptor does not have a resilient superclass.- Returns:
- the negative size of metadata objects of this class (in words) if this descriptor does not have a resilient superclass
-
getExtraClassDescriptorFlags
Returns flags used to do things like indicate the presence of an Objective-C resilient class stub if this descriptor has a resilient superclass; otherwise,null.- Returns:
- flags used to do things like indicate the presence of an Objective-C resilient class
stub if this descriptor has a resilient superclass; otherwise,
null
-
getMetadataPositiveSizeInWords
public int getMetadataPositiveSizeInWords()Returns the positive size of metadata objects of this class (in words) if this descriptor does not have a resilient superclass.- Returns:
- the positive size of metadata objects of this class (in words) if this descriptor does not have a resilient superclass
-
getNumImmediateMembers
public int getNumImmediateMembers()Returns the number of additional members added by this class to the class metadata.- Returns:
- the number of additional members added by this class to the class metadata
-
getNumFields
public int getNumFields()Returns the number of stored properties in the class, not including its superclasses.If there is a field offset vector, this is its length.
- Returns:
- the number of stored properties in the class, not including its superclasses
-
getFieldOffsetVectorOffset
public int getFieldOffsetVectorOffset()Returns the offset of the field offset vector for this class's stored properties in its metadata, in words (0 means there is no field offset vector).- Returns:
- the offset of the field offset vector for this class's stored properties in its metadata, in words (0 means there is no field offset vector)
-
getGenericHeader
Returns theTargetTypeGenericContextDescriptorHeader, ornullif it doesn't exist.- Returns:
- the
TargetTypeGenericContextDescriptorHeader, ornullif it doesn't exist
-
getResilientSuperclass
Returns theTargetResilientSuperclass, ornullif it doesn't exist.- Returns:
- the
TargetResilientSuperclass, ornullif it doesn't exist
-
getTargetSingletonMetadataInitialization
Returns theTargetSingletonMetadataInitialization, ornullif it doesn't exist.- Returns:
- the
TargetSingletonMetadataInitialization, ornullif it doesn't exist
-
getTargetForeignMetadataInitialization
Returns theTargetForeignMetadataInitialization, ornullif it doesn't exist.- Returns:
- the
TargetForeignMetadataInitialization, ornullif it doesn't exist
-
getVTableDescriptorHeader
Returns theTargetVTableDescriptorHeader, ornullif it doesn't exist.- Returns:
- the
TargetVTableDescriptorHeader, ornullif it doesn't exist
-
getMethodDescriptors
Returns theListof method descriptors.- Returns:
- the
Listof method descriptors
-
getTargetOverrideTableHeader
Returns theTargetOverrideTableHeader, ornullif it doesn't exist.- Returns:
- the
TargetOverrideTableHeader, ornullif it doesn't exist
-
getMethodOverrideDescriptors
Returns theListof method override descriptors.- Returns:
- the
Listof method override descriptors
-
getObjcResilientClassStub
Returns theTargetObjCResilientClassStubInfo, ornullif it doesn't exist.- Returns:
- the
TargetObjCResilientClassStubInfo, ornullif it doesn't exist
-
getInvertibleProtocolSet
Returns theInvertibleProtocolSet, ornullif it doens't exist.- Returns:
- the
InvertibleProtocolSet, ornullif it doens't exist
-
getTrailingObjects
Description copied from class:SwiftTypeMetadataStructure- Overrides:
getTrailingObjectsin classSwiftTypeMetadataStructure- Returns:
- a
Listofstructuresthat trail thisstructure
-
getStructureName
Description copied from class:SwiftTypeMetadataStructureReturns the name of theSwiftTypeMetadataStructure.- Overrides:
getStructureNamein classTargetTypeContextDescriptor- Returns:
- the name of the
SwiftTypeMetadataStructure
-
getDescription
Description copied from class:SwiftTypeMetadataStructureReturns a short description of theSwiftTypeMetadataStructure.- Overrides:
getDescriptionin classTargetTypeContextDescriptor- Returns:
- a short description of the
SwiftTypeMetadataStructure
-
toDataType
Description copied from interface:StructConverterReturns a structure datatype representing the contents of the implementor of this interface.For example, given:
class A { int foo; double bar; }The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.
- Specified by:
toDataTypein interfaceStructConverter- Overrides:
toDataTypein classTargetTypeContextDescriptor- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException- when a datatype of the same name already existsIOException- if an IO-related error occurs- See Also:
-