Command Helper
Definition of command use examples
Annotations
The @CommandExamples annotation is used to provide structured, parameterized examples of how a particular command can be used. Each example consists of two parts:
- Short Description: A concise explanation of what the command does.
- Parameterized Example Code: A practical example of the command tag with its attributes and values.
This annotation is particularly useful for documenting commands like <Out>
, offering clear, actionable examples that demonstrate different use cases. Below is an example of how @CommandExamples
is applied to the <Out>
command:
@CommandExamples({ "Output a property by name: <Out name='type:property'/>",
"Outputs the value of the specified frameId: <Out frameId='type:string'/>",
"Outputs a property value with a specified log level: <Out name='type:property' level='enum:info|debug|warn|error'/>",
"Outputs a property value with a message at a specified log level: <Out name='type:property' level='enum:info|debug|warn|error'> ... </Out>",
"Outputs a property value at specified log level: <Out level='enum:info|debug|warn|error'>... $var{...}</Out>",
"Writes output to a file with options to append content and specify encoding: <Out file='type:path' append='enum:true|false' encoding='UTF-8'/>" })
public void runCommandOut(final Node command) throws UnsupportedEncodingException, IOException {
...