Module openj9.dtfj

Class Command

java.lang.Object
com.ibm.j9ddr.tools.ddrinteractive.Command
All Implemented Interfaces:
ICommand
Direct Known Subclasses:
ACCommand, AllClassesCommand, AnalyseRomClassUTF8Command, BuildFlagsCommand, BytecodesCommand, ClassForNameCommand, ClassloadersSummaryCommand, CompressedRefMappingCommand, ContinuationStackWalkCommand, CoreInfoCommand, CPDescriptionCommand, DDRInteractive.ContextCommand, DDRInteractive.J9HelpCommand, DumpAllClassesInModuleCommand, DumpAllClassloadersCommand, DumpAllRamClassLinearCommand, DumpAllRegionsCommand, DumpAllRomClassLinearCommand, DumpAllSegmentsCommand, DumpContendedLoadTable, DumpModuleCommand, DumpModuleDirectedExportsCommand, DumpModuleExportsCommand, DumpModuleReadsCommand, DumpPackageCommand, DumpRamClassLinearCommand, DumpRomClassCommand, DumpRomClassLinearCommand, DumpRomMethodCommand, DumpSegmentsInListCommand, DumpSegregatedStatsCommand, DumpStringTableCommand, ExtendedMethodFlagInfoCommand, ExtractMemoryCommand, FindAllModulesCommand, FindAllReadsCommand, FindInMemoryCommand, FindInstances, FindMethodFromPcCommand, FindModuleByNameCommand, FindModulesCommand, FindOverlappingSegmentsCommand, FindPatternCommand, FindStackValueCommand, FindVMCommand, FlatObjectCommand, ForeachCommand, GCCheckCommand, GpInfoCommand, HashCodeCommand, ITableSizeCommand, J9ClassShapeCommand, J9ConstantPoolCommand, J9MemTagCommands, J9StaticsCommand, J9VTablesCommand, J9XCommand, JextractCommand, JitMetadataFromPcCommand, JitstackCommand, LocalMapCommand, LookupSymbolCommand, MarkMapCommand, MemoryRangesCommand, MethodForNameCommand, MonitorsCommand, NativeLibrariesCommand, NativeMemInfoCommand, NativeStacksCommand, ObjectRefsCommand, ObjectSizeInfo, PluginCommand, QueryRomClassCommand, RamClassSummaryCommand, RomClassForNameCommand, RomClassSummaryCommand, RootPathCommand, RuntimeSettingsCommand, SearchStringTableCommand, SetVMCommand, ShowDumpAgentsCommand, ShrCCommand, SnapBaseCommand, SnapFormatWrapperCommand, StackmapCommand, StackWalkCommand, ThreadsCommand, TimeCommand, TraceConfigCommand, TrPrintCommand, ValidateTraceFreeQueueCommand, VirtualThreadsCommand, VmCheckCommand, VMConstantPoolCommand, WalkInternTableCommand, WalkJ9PoolCommand, WalkUtThreadDataCommand, WhatIsCommand

public abstract class Command extends Object implements ICommand
  • Field Details

    • nl

      protected static final String nl
  • Constructor Details

    • Command

      public Command()
  • Method Details

    • addCommand

      public Command.CommandDescription addCommand(String name, String argDescription, String helpDescription)
      Parameters:
      name - Command Name
      argDescription - Brief name of any optional or required arguments
      helpDescription - One-liner Description of the command argDescription should be a word describing the argument name. e.g:
      to specify an address argument that is mandatory [address] to specify an address argument that is optional
    • addSubCommand

      public void addSubCommand(Command.CommandDescription command, String name, String argDescription, String helpDescription)
    • recognises

      public boolean recognises(String command, Context context)
      Description copied from interface: ICommand
      Method used by the DDR Interactive engine to decide whether this command matches the command passed in by the user
      Specified by:
      recognises in interface ICommand
      Parameters:
      command - Command string entered by user. e.g. !j9x
      context - Current DDRInteractive context
      Returns:
      True if this command object can process the supplied command (in which case the DDR engine will then call run())
    • getCommandDescriptions

      public Collection<String> getCommandDescriptions()
      Specified by:
      getCommandDescriptions in interface ICommand
      Returns:
      Strings to be inserted in !j9help output
    • getCommandNames

      public Set<String> getCommandNames()
      Specified by:
      getCommandNames in interface ICommand
      Returns:
      Strings containing command names
    • printDetailedHelp

      public void printDetailedHelp(PrintStream out)
      This prints the detailed help for the command by listing all the names that this command can be invoked by and also any sub commands that have been defined.
      Parameters:
      out - stream to write the output on
    • dbgFindPatternInRange

      protected long dbgFindPatternInRange(Context context, byte[] pattern, int patternAlignment, long startSearchFrom, BigInteger bytesToSearch) throws MemoryFault
      Throws:
      MemoryFault