java.lang.Object
com.ibm.j9ddr.tools.ddrinteractive.BaseStructureCommand
- All Implemented Interfaces:
ICommand
- Direct Known Subclasses:
StructureCommand
Base class for structure formatting commands
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Collection<String> final booleanrecognises(String command, Context context) Method used by the DDR Interactive engine to decide whether this command matches the command passed in by the userprotected voidInserts supplied structure formatter at the end of the list.protected voidregisterFieldFormatter(IFieldFormatter formatter) Inserts supplied field formatter at the head of the list.protected voidregisterStructureFormatter(IStructureFormatter formatter) Inserts supplied structure formatter at the head of the list.final voidrun(String command, String[] args, Context context, PrintStream out) Executes the command
-
Constructor Details
-
BaseStructureCommand
public BaseStructureCommand()
-
-
Method Details
-
recognises
Description copied from interface:ICommandMethod used by the DDR Interactive engine to decide whether this command matches the command passed in by the user- Specified by:
recognisesin interfaceICommand- Parameters:
command- Command string entered by user. e.g. !j9xcontext- Current DDRInteractive context- Returns:
- True if this command object can process the supplied command (in which case the DDR engine will then call run())
-
registerFieldFormatter
Inserts supplied field formatter at the head of the list.- Parameters:
formatter-
-
registerStructureFormatter
Inserts supplied structure formatter at the head of the list.- Parameters:
formatter-
-
registerDefaultStructureFormatter
Inserts supplied structure formatter at the end of the list.- Parameters:
formatter-
-
run
public final void run(String command, String[] args, Context context, PrintStream out) throws DDRInteractiveCommandException Description copied from interface:ICommandExecutes the command- Specified by:
runin interfaceICommand- Parameters:
command- Command string e.g. !j9xargs- Arguments for commandcontext- Context to work inout- PrintStream to write command output on- Throws:
DDRInteractiveCommandException- If there is any problem running the command (incorrect usage, CorruptData etc.)
-
getCommandDescriptions
- Specified by:
getCommandDescriptionsin interfaceICommand- Returns:
- Strings to be inserted in !j9help output
-
getCommandNames
- Specified by:
getCommandNamesin interfaceICommand- Returns:
- Strings containing command names
-