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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Collection<String>
final boolean
recognises
(String command, Context context) Method used by the DDR Interactive engine to decide whether this command matches the command passed in by the userprotected void
Inserts supplied structure formatter at the end of the list.protected void
registerFieldFormatter
(IFieldFormatter formatter) Inserts supplied field formatter at the head of the list.protected void
registerStructureFormatter
(IStructureFormatter formatter) Inserts supplied structure formatter at the head of the list.final void
run
(String command, String[] args, Context context, PrintStream out) Executes the command
-
Constructor Details
-
BaseStructureCommand
public BaseStructureCommand()
-
-
Method Details
-
recognises
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 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:ICommand
Executes the command- Specified by:
run
in 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:
getCommandDescriptions
in interfaceICommand
- Returns:
- Strings to be inserted in !j9help output
-
getCommandNames
- Specified by:
getCommandNames
in interfaceICommand
- Returns:
- Strings containing command names
-