antlraux package
v0.2.1

antlraux.clparse
Class CommandSpec

java.lang.Object
  |
  +--antlraux.clparse.CommandSpec

public class CommandSpec
extends java.lang.Object

This class encapsulates the specification of a command. That involves storing a command name, the types an number of params that the command has, a Method to invoke, the object that will execute it (called executor), and a description for the usage message.

Author:
Enrique José García Cota

Field Summary
protected  java.lang.String commandName
           
protected  java.lang.String description
           
protected  java.lang.Object executer
           
protected  java.lang.reflect.Method method
           
protected  java.lang.String paramTypes
           
protected  java.lang.Object[] types
           
 
Constructor Summary
protected CommandSpec(java.lang.Object executer, java.lang.String commandName, java.lang.String paramTypes, java.lang.String methodName, java.lang.String description)
          Constructs a new command specification.
 
Method Summary
protected  java.lang.String getCompleteMethodName()
          Returns an String containing with the format executer-class.method(list-of-types), where executer-class if the class of the executer object and list-of-types is the list of params of the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paramTypes

protected java.lang.String paramTypes

commandName

protected java.lang.String commandName

description

protected java.lang.String description

method

protected java.lang.reflect.Method method

executer

protected java.lang.Object executer

types

protected java.lang.Object[] types
Constructor Detail

CommandSpec

protected CommandSpec(java.lang.Object executer,
                      java.lang.String commandName,
                      java.lang.String paramTypes,
                      java.lang.String methodName,
                      java.lang.String description)
               throws CommandLineParserException
Constructs a new command specification.

Parameters:
executer - The object that will execute the method.
commandName - The name of the command that the objects specifies.
paramTypes - A string that specifies the parameters that the command needs.
methodName - The method of executer that will be launched by the tasks associated to this CommandSpec
description - The usage message for the command.
Throws:
CommandLineParserException - If an error has ocurred creating the object.
Method Detail

getCompleteMethodName

protected java.lang.String getCompleteMethodName()
Returns an String containing with the format executer-class.method(list-of-types), where executer-class if the class of the executer object and list-of-types is the list of params of the method.

Returns:
the String describing the method

antlraux package
v0.2.1

Created by Enrique José García Cota