Module openj9.dtfj

Interface IStructureFormatter

    • Method Detail

      • preFormat

        FormatWalkResult preFormat​(String type,
                                   long address,
                                   PrintStream out,
                                   Context context,
                                   List<IFieldFormatter> fieldFormatters,
                                   String[] extraArgs)
        Method called by the Structure command before the format() method walk.
        Parameters:
        address - Address to be formatted
        out - PrintStream to write result to. Do not write a new line at the end of your output.
        context - Current DDRInteractive context
        fieldFormatters - List of field formatters. This list will be used for other IStructureFormatters, so any changes you make will affect downstream formatters (but only for this formatting operation).
        extraArgs - Extra arguments passed by the user after the structure address
        Returns:
        KEEP_WALKING if the format walk should keep going (delegating to other formatters), STOP_WALKING if the format walk should stop
      • format

        FormatWalkResult format​(String type,
                                long address,
                                PrintStream out,
                                Context context,
                                List<IFieldFormatter> fieldFormatters,
                                String[] extraArgs)
        Method called by the Structure command after the preFormat() and before the postFormat() walks.
        Parameters:
        address - Address to be formatted
        out - PrintStream to write result to. Do not write a new line at the end of your output.
        context - Current DDRInteractive context
        fieldFormatters - List of field formatters. This list will be used for other IStructureFormatters, so any changes you make will affect downstream formatters (but only for this formatting operation).
        extraArgs - Extra arguments passed by the user after the structure address
        Returns:
        KEEP_WALKING if the format walk should keep going (delegating to other formatters), STOP_WALKING if the format walk should stop
      • postFormat

        FormatWalkResult postFormat​(String type,
                                    long address,
                                    PrintStream out,
                                    Context context,
                                    List<IFieldFormatter> fieldFormatters,
                                    String[] extraArgs)
        Method called by the Structure command after the format() walk.
        Parameters:
        address - Address to be formatted
        out - PrintStream to write result to. Do not write a new line at the end of your output.
        context - Current DDRInteractive context
        fieldFormatters - List of field formatters. This list will be used for other IStructureFormatters, so any changes you make will affect downstream formatters (but only for this formatting operation).
        extraArgs - Extra arguments passed by the user after the structure address
        Returns:
        KEEP_WALKING if the format walk should keep going (delegating to other formatters), STOP_WALKING if the format walk should stop
      • formatField

        void formatField​(String name,
                         String type,
                         String declaredType,
                         long address,
                         PrintStream out,
                         Context context)
                  throws CorruptDataException
        Parameters:
        name - Name of field
        type - Type of field e.g. struct J9JavaVM
        declaredType - The type as declared in native code
        address - Address of field slot
        out - PrintStream to format to
        context - DDRInteractive context
        Throws:
        CorruptDataException - If there's a problem accessing the field