Class WhatisCommand
java.lang.Object
com.ibm.java.diagnostics.utils.commands.BaseCommand
com.ibm.jvm.dtfjview.commands.BaseJdmpviewCommand
com.ibm.jvm.dtfjview.commands.WhatisCommand
- All Implemented Interfaces:
ICommand
-
Nested Class Summary
Nested classes/interfaces declared in class BaseJdmpviewCommand
BaseJdmpviewCommand.ArtifactTypeModifier and TypeClassDescriptionprotected static enumEnum for identifying the type of artifact that is currently being analyzed. -
Field Summary
Fields declared in class BaseJdmpviewCommand
ctx, hexfmt, logger, outModifier and TypeFieldDescriptionprotected IDTFJContextprotected Stringprotected Loggerprotected PrintStreamFields declared in class BaseCommand
COMMAND_FORMAT, config, nl, SUBCOMMAND_FORMATModifier and TypeFieldDescriptionprotected static final Stringprotected PluginConfigprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPrint detailed help for a given commandvoidrun(String command, String[] args, IContext context, PrintStream out) Executes the commandMethods declared in class BaseJdmpviewCommand
decodeThreadState, getArtifactType, handleException, initCommand, toHexString, toHexString, toHexString, toHexString, toHexStringAddr, toLong, toString, toStringModifier and TypeMethodDescriptiondecodeThreadState(int state) Textual description of a thread state.protected BaseJdmpviewCommand.ArtifactTypeDetermine the type of artifact currently being operated on.handleException(Throwable cause) Lots of DTFJ methods will throw a standard set of exceptions such as corrupt data or data unavailable.final booleaninitCommand(String command, String[] args, IContext context, PrintStream out) Common processing to initialize the command and make the porting of existing jdmpview commands easier.toHexString(byte num) Format a number with the correct number of zeros as padding according to the data type passed in.toHexString(int num) Format a number with the correct number of zeros as padding according to the data type passed in.toHexString(long num) Format a number with the correct number of zeros as padding according to the data type passed in.toHexString(short num) Format a number with the correct number of zeros as padding according to the data type passed in.toHexStringAddr(long num) Format an address as hex padded with zeros according to the size of the process. e.g. 17 would be formatted as 0x00000011 for 32 bit and 0x0000000000000011 for 64 bitlongTypically used when an extension takes a numeric argument, and wants to accept a variety of formats.toString(double num) Convenience method to convert a number into a String to display.toString(float num) Convenience method to convert a number into a String to display.Methods declared in class BaseCommand
addCommand, addSubCommand, getCommandDescriptions, getCommandNames, getConfig, recognises, setConfigModifier and TypeMethodDescriptionaddCommand(String name, String argDescription, String helpDescription) voidaddSubCommand(String cmdname, String subname, String argDescription, String help) Identifies the configuration from which this command was created.booleanrecognises(String command, IContext context) Method used by an interactive engine to decide whether this command matches the command passed in by the uservoidsetConfig(PluginConfig config)
-
Constructor Details
-
WhatisCommand
public WhatisCommand()
-
-
Method Details
-
run
public void run(String command, String[] args, IContext context, PrintStream out) throws CommandException Description copied from interface:ICommandExecutes the command- Parameters:
command- Command string e.g. !j9xargs- Arguments for commandcontext- Context to work inout- PrintStream to write command output on- Throws:
CommandException- If there is any problem running the command (incorrect usage, CorruptData etc.)
-
printDetailedHelp
Description copied from class:BaseJdmpviewCommandPrint detailed help for a given command- Specified by:
printDetailedHelpin classBaseJdmpviewCommand- Parameters:
out- stream to write the output to
-