Interface StructConverter

All Known Subinterfaces:
CoffSymbolAux, ElfFileSection, OptionalHeader
All Known Implementing Classes:
AoutHeader, AoutHeaderMIPS, AppleSingleDouble, ArchitectureDataDirectory, AssociatedTypeDescriptor, AssociatedTypeRecord, BaseRelocation, BoundImportDescriptor, BoundImportForwarderRef, BuildVersionCommand, BuildVersionCommand.BuildToolVersion, BuiltinTypeDescriptor, CaptureDescriptor, CaptureTypeRecord, CFragResource, CFragResourceMember, CFragUsage1Union, CFragUsage2Union, CFragWhere1Union, CFragWhere2Union, CliAbstractSig, CliAbstractStream, CliAbstractTable, CliBlob, CliBlobCustomAttrib, CliBlobMarshalSpec, CliMetadataDirectory, CliMetadataRoot, CliMethodDef, CliMethodExtraSections, CliSigAssembly, CliSigAssemblyRef, CliSigConstant, CliSigField, CliSigLocalVar, CliSigMethodDef, CliSigMethodRef, CliSigMethodSpec, CliSigProperty, CliSigStandAloneMethod, CliSigTypeSpec, CliStreamBlob, CliStreamGuid, CliStreamHeader, CliStreamMetadata, CliStreamStrings, CliStreamUserStrings, CliTableAssembly, CliTableAssemblyOS, CliTableAssemblyProcessor, CliTableAssemblyRef, CliTableAssemblyRefOS, CliTableAssemblyRefProcessor, CliTableClassLayout, CliTableConstant, CliTableCustomAttribute, CliTableDeclSecurity, CliTableEvent, CliTableEventMap, CliTableExportedType, CliTableField, CliTableFieldLayout, CliTableFieldMarshall, CliTableFieldRVA, CliTableFile, CliTableGenericParam, CliTableGenericParamConstraint, CliTableImplMap, CliTableInterfaceImpl, CliTableManifestResource, CliTableMemberRef, CliTableMethodDef, CliTableMethodImpl, CliTableMethodSemantics, CliTableMethodSpec, CliTableModule, CliTableModuleRef, CliTableNestedClass, CliTableParam, CliTableProperty, CliTablePropertyMap, CliTableStandAloneSig, CliTableTypeDef, CliTableTypeRef, CliTableTypeSpec, CodeSignatureBlobIndex, CodeSignatureCodeDirectory, CodeSignatureCommand, CodeSignatureGenericBlob, CodeSignatureSuperBlob, CoffArchiveHeader, CoffArchiveMemberHeader, CoffFileHeader, CoffLineNumber, CoffRelocation, CoffSectionHeader, CoffSymbol, CoffSymbolAuxArray, CoffSymbolAuxBeginningOfBlock, CoffSymbolAuxEndOfBlock, CoffSymbolAuxEndOfStruct, CoffSymbolAuxFilename, CoffSymbolAuxFunction, CoffSymbolAuxName, CoffSymbolAuxSection, CoffSymbolAuxTagName, ContainerHeader, CorruptLoadCommand, DataInCodeCommand, DataInCodeEntry, DebugCodeView, DebugCodeViewSymbolTable, DebugCOFFSymbol, DebugCOFFSymbolAux, DebugCOFFSymbolAux.AuxFile, DebugCOFFSymbolAux.AuxSection, DebugCOFFSymbolAux.AuxSym, DebugDirectory, DebugMisc, DebugStateX86_32, DebugStateX86_64, DefaultDataDirectory, DelayImportDescriptor, DOSHeader, DyldCacheAccelerateInfo, DyldCacheAcceleratorDof, DyldCacheAcceleratorInitializer, DyldCacheHeader, DyldCacheImageInfo, DyldCacheImageInfoExtra, DyldCacheImageTextInfo, DyldCacheLocalSymbolsEntry, DyldCacheLocalSymbolsInfo, DyldCacheMappingAndSlideInfo, DyldCacheMappingInfo, DyldCacheRangeEntry, DyldCacheSlideInfo1, DyldCacheSlideInfo2, DyldCacheSlideInfo3, DyldCacheSlideInfo4, DyldCacheSlideInfo5, DyldCacheSlideInfoCommon, DyldChainedFixupHeader, DyldChainedFixupsCommand, DyldChainedImport, DyldChainedStartsInImage, DyldChainedStartsInSegment, DyldChainedStartsOffsets, DyldChainedStartsOffsets, DyldExportsTrieCommand, DyldInfoCommand, DyldSubcacheEntry, DynamicLibrary, DynamicLibraryCommand, DynamicLibraryModule, DynamicLibraryReference, DynamicLinkerCommand, DynamicSymbolTableCommand, ElfDynamicTable, ElfHeader, ElfProgramHeader, ElfRelocation, ElfRelocationTable, ElfSectionHeader, ElfStringTable, ElfSymbolTable, EncryptedInformationCommand, EntryDescriptor, EntryPoint, EntryPointCommand, ExceptionStateX86_32, ExceptionStateX86_64, ExportDataDirectory, ExportedSymbol, ExportedSymbolHashSlot, ExportedSymbolKey, FieldDescriptor, FieldRecord, FileHeader, FileSetEntryCommand, FirstLinkerMember, FixedVirtualMemoryFileCommand, FixedVirtualMemorySharedLibraryCommand, FunctionStartsCommand, GnuVerdaux, GnuVerdef, GnuVernaux, GnuVerneed, IdentCommand, ImageCor20Header, ImportByName, ImportDescriptor, ImportedLibrary, ImportedSymbol, LibObjcOptimization, LinkEditDataCommand, LinkerOptionCommand, LoadCommand, LoadCommandString, LoadConfigDirectory, LoaderInfoHeader, LoaderRelocationHeader, LongNamesMember, MachHeader, MetadataSourceRecord, MultiPayloadEnumDescriptor, MzRelocation, NList, NTHeader, ObjectiveC_Method, ObjectiveC_MethodList, ObjectiveC1_Category, ObjectiveC1_Class, ObjectiveC1_InstanceVariable, ObjectiveC1_InstanceVariableList, ObjectiveC1_MetaClass, ObjectiveC1_Method, ObjectiveC1_MethodList, ObjectiveC1_Module, ObjectiveC1_Protocol, ObjectiveC1_ProtocolList, ObjectiveC1_ProtocolMethod, ObjectiveC1_ProtocolMethodList, ObjectiveC1_SymbolTable, ObjectiveC2_Cache, ObjectiveC2_Category, ObjectiveC2_Class, ObjectiveC2_ClassRW, ObjectiveC2_ImageInfo, ObjectiveC2_Implementation, ObjectiveC2_InstanceVariable, ObjectiveC2_InstanceVariableList, ObjectiveC2_MessageReference, ObjectiveC2_Method, ObjectiveC2_MethodList, ObjectiveC2_Property, ObjectiveC2_PropertyList, ObjectiveC2_Protocol, ObjectiveC2_ProtocolList, ObsoleteCommand, OldDOSHeader, Omf166DepList, Omf2or4, Omf51ModuleEnd, Omf51ModuleHeader, OmfComdatExternalSymbol, OmfComdefRecord, OmfCommentRecord, OmfData, OmfEnumeratedData, OmfExternalSymbol, OmfFileHeader, OmfFixupRecord, OmfGroupRecord, OmfIndex, OmfIteratedData, OmfModuleEnd, OmfNamesRecord, OmfObsoleteRecord, OmfRecord, OmfSegmentHeader, OmfString, OmfSymbolRecord, OmfUnknownRecord, OmfUnsupportedRecord, OptionalHeaderImpl, PdbInfoCodeView, PdbInfoDotNet, PefDebug, PrebindChecksumCommand, PreboundDynamicLibraryCommand, ReferenceListEntry, Relocation, RelocationInfo, RelocByIndexGroup, RelocBySectDWithSkip, RelocIncrPosition, RelocLgByImport, RelocLgRepeat, RelocLgSetOrBySection, RelocSetPosition, RelocSmRepeat, RelocUndefinedOpcode, RelocValueGroup, ResourceDataEntry, ResourceDirectory, ResourceDirectoryEntry, ResourceDirectoryString, ResourceDirectoryStringU, ResourceHeader, ResourceMap, ResourceType, RichHeader, RoutinesCommand, RunPathCommand, SecondLinkerMember, Section, SectionHeader, SectionHeader, SecurityCertificate, SegmentCommand, SourceVersionCommand, SubClientCommand, SubFrameworkCommand, SubLibraryCommand, SubUmbrellaCommand, SwiftTypeMetadataStructure, SymbolCommand, SymbolTableCommand, TableOfContents, TargetClassDescriptor, TargetContextDescriptor, TargetEnumDescriptor, TargetProtocolConformanceDescriptor, TargetProtocolDescriptor, TargetStructDescriptor, TargetTypeContextDescriptor, ThreadCommand, ThreadState, ThreadStateARM, ThreadStateARM_64, ThreadStateHeader, ThreadStatePPC, ThreadStateX86_32, ThreadStateX86_64, ThunkData, TLSDirectory, TwoLevelHint, TwoLevelHintsCommand, UnsupportedLoadCommand, UuidCommand, VersionMinCommand, VS_VERSION_CHILD, VS_VERSION_INFO, XCoffFileHeader, XCoffOptionalHeader, XCoffSectionHeader

public interface StructConverter
Allows a class to create a structure datatype equivalent to its class members.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DataType
    Reusable ASCII datatype.
    static final DataType
    Reusable BYTE datatype.
    static final DataType
    Reusable DWORD datatype.
    static final DataType
    Reusable 32-bit image base offset datatype.
    static final DataType
    Reusable 64-bit image base offset datatype.
    static final DataType
    Reusable POINTER datatype.
    static final DataType
    Reusable QWORD datatype.
    Reusable Signed LEB128 dynamic length data type
    static final DataType
    Reusable STRING datatype.
    Reusable Unsigned LEB128 dynamic length data type
    static final DataType
    Reusable UTF16 string datatype.
    static final DataType
    Reusable UTF8 string datatype.
    static final DataType
    Reusable VOID datatype.
    static final DataType
    Reusable WORD datatype.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    setEndian(Data data, boolean bigEndian)
    Recursively sets the given Data and its components to big/little endian
    Returns a structure datatype representing the contents of the implementor of this interface.
  • Field Details

    • BYTE

      static final DataType BYTE
      Reusable BYTE datatype.
    • WORD

      static final DataType WORD
      Reusable WORD datatype.
    • DWORD

      static final DataType DWORD
      Reusable DWORD datatype.
    • QWORD

      static final DataType QWORD
      Reusable QWORD datatype.
    • ASCII

      static final DataType ASCII
      Reusable ASCII datatype.
    • STRING

      static final DataType STRING
      Reusable STRING datatype.
    • UTF8

      static final DataType UTF8
      Reusable UTF8 string datatype.
    • UTF16

      static final DataType UTF16
      Reusable UTF16 string datatype.
    • POINTER

      static final DataType POINTER
      Reusable POINTER datatype.
    • VOID

      static final DataType VOID
      Reusable VOID datatype.
    • IBO32

      static final DataType IBO32
      Reusable 32-bit image base offset datatype.
    • IBO64

      static final DataType IBO64
      Reusable 64-bit image base offset datatype.
    • ULEB128

      static final UnsignedLeb128DataType ULEB128
      Reusable Unsigned LEB128 dynamic length data type
    • SLEB128

      static final SignedLeb128DataType SLEB128
      Reusable Signed LEB128 dynamic length data type
  • Method Details

    • toDataType

      Returns 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.

      Returns:
      returns a structure datatype representing the implementor of this interface
      Throws:
      DuplicateNameException - when a datatype of the same name already exists
      IOException - if an IO-related error occurs
      See Also:
    • setEndian

      static void setEndian(Data data, boolean bigEndian) throws Exception
      Recursively sets the given Data and its components to big/little endian
      Parameters:
      data - The Data
      bigEndian - True to set to big endian; false to set to little endian
      Throws:
      Exception - if there was a problem setting the endianness