tools/twiddle/cli/src/main/java/org/mobicents/tools/twiddle/jslee/TraceCommand.java
@Override
	protected void processArguments(String[] args) throws CommandException {
		String sopts = ":a:f:sug";

		LongOpt[] lopts = {
				new LongOpt("tracers-used", LongOpt.REQUIRED_ARGUMENT, null, 'a'),
				new LongOpt("tracers-set", LongOpt.REQUIRED_ARGUMENT, null, 'f'),
				new LongOpt("set-level", LongOpt.NO_ARGUMENT, null, 's'),
					new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.cid),
					new LongOpt("nsrc", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.nsrc),
					new LongOpt("name", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.name),
					new LongOpt("level", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.level),
				new LongOpt("un-set-level", LongOpt.NO_ARGUMENT, null, 'u'),
					new LongOpt("nsrc", LongOpt.REQUIRED_ARGUMENT, null, UnsetLevelOperation.nsrc),
					new LongOpt("name", LongOpt.REQUIRED_ARGUMENT, null, UnsetLevelOperation.name),
				new LongOpt("get-level", LongOpt.NO_ARGUMENT, null, 'g'),
					new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, GetLevelOperation.cid),
					new LongOpt("nsrc", LongOpt.REQUIRED_ARGUMENT, null, GetLevelOperation.nsrc),
					new LongOpt("name", LongOpt.REQUIRED_ARGUMENT, null, GetLevelOperation.name), };

		Getopt getopt = new Getopt(null, args, sopts, lopts);
		// getopt.setOpterr(false);

		int code;
		while ((code = getopt.getopt()) != -1) {
			switch (code) {
			case ':':
				throw new CommandException("Option requires an argument: " + args[getopt.getOptind() - 1]);

			case '?':
				throw new CommandException("Invalid (or ambiguous) option: " + args[getopt.getOptind() - 1]);

			case 'a':

				super.operation = new GetTracersUsedOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;

			case 'f':

				super.operation = new GetTracersSetOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 's':

				super.operation = new SetLevelOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'u':

				super.operation = new UnsetLevelOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'g':

				super.operation = new GetLevelOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			default:
				throw new CommandException("Command: \"" + getName() + "\", found unexpected opt: " + args[getopt.getOptind() - 1]);

			}
		}

	}
@Override
	protected void processArguments(String[] args) throws CommandException {
		String sopts = ":a:f:sug";

		LongOpt[] lopts = {
				new LongOpt("tracers-used", LongOpt.REQUIRED_ARGUMENT, null, 'a'),
				new LongOpt("tracers-set", LongOpt.REQUIRED_ARGUMENT, null, 'f'),
				new LongOpt("set-level", LongOpt.NO_ARGUMENT, null, 's'),
					new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.cid),
					new LongOpt("nsrc", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.nsrc),
					new LongOpt("name", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.name),
					new LongOpt("level", LongOpt.REQUIRED_ARGUMENT, null, SetLevelOperation.level),
				new LongOpt("un-set-level", LongOpt.NO_ARGUMENT, null, 'u'),
					new LongOpt("nsrc", LongOpt.REQUIRED_ARGUMENT, null, UnsetLevelOperation.nsrc),
					new LongOpt("name", LongOpt.REQUIRED_ARGUMENT, null, UnsetLevelOperation.name),
				new LongOpt("get-level", LongOpt.NO_ARGUMENT, null, 'g'),
					new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, GetLevelOperation.cid),
					new LongOpt("nsrc", LongOpt.REQUIRED_ARGUMENT, null, GetLevelOperation.nsrc),
					new LongOpt("name", LongOpt.REQUIRED_ARGUMENT, null, GetLevelOperation.name), };

		Getopt getopt = new Getopt(null, args, sopts, lopts);
		// getopt.setOpterr(false);

		int code;
		while ((code = getopt.getopt()) != -1) {
			switch (code) {
			case ':':
				throw new CommandException("Option requires an argument: " + args[getopt.getOptind() - 1]);

			case '?':
				throw new CommandException("Invalid (or ambiguous) option: " + args[getopt.getOptind() - 1]);

			case 'a':

				super.operation = new GetTracersUsedOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;

			case 'f':

				super.operation = new GetTracersSetOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 's':

				super.operation = new SetLevelOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'u':

				super.operation = new UnsetLevelOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			case 'g':

				super.operation = new GetLevelOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);
				break;
			default:
				throw new CommandException("Command: \"" + getName() + "\", found unexpected opt: " + args[getopt.getOptind() - 1]);

			}
		}

	}
@ Override protected void processArguments ( String [ ] args ) throws CommandException { String sopts = ":a:f:sug" ; LongOpt [ ] lopts = { new LongOpt ( "tracers-used" , LongOpt . REQUIRED_ARGUMENT , null , ' ' ) , new LongOpt ( "tracers-set" , LongOpt . REQUIRED_ARGUMENT , null , ' ' ) , new LongOpt ( "set-level" , LongOpt . NO_ARGUMENT , null , ' ' ) , new LongOpt ( "cid" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . cid ) , new LongOpt ( "nsrc" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . nsrc ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . name ) , new LongOpt ( "level" , LongOpt . REQUIRED_ARGUMENT , null , SetLevelOperation . level ) , new LongOpt ( "un-set-level" , LongOpt . NO_ARGUMENT , null , ' ' ) , new LongOpt ( "nsrc" , LongOpt . REQUIRED_ARGUMENT , null , UnsetLevelOperation . nsrc ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , UnsetLevelOperation . name ) , new LongOpt ( "get-level" , LongOpt . NO_ARGUMENT , null , ' ' ) , new LongOpt ( "cid" , LongOpt . REQUIRED_ARGUMENT , null , GetLevelOperation . cid ) , new LongOpt ( "nsrc" , LongOpt . REQUIRED_ARGUMENT , null , GetLevelOperation . nsrc ) , new LongOpt ( "name" , LongOpt . REQUIRED_ARGUMENT , null , GetLevelOperation . name ) , } ; Getopt getopt = new Getopt ( null , args , sopts , lopts ) ; // getopt.setOpterr(false);
 int code ; while ( ( code = getopt . getopt ( ) ) != - 1 ) { switch ( code ) { case ' ' : throw new CommandException ( "Option requires an argument: " + args [ getopt . getOptind ( ) - 1 ] ) ; case ' ' : throw new CommandException ( "Invalid (or ambiguous) option: " + args [ getopt . getOptind ( ) - 1 ] ) ; case ' ' : super . operation = new GetTracersUsedOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new GetTracersSetOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new SetLevelOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new UnsetLevelOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new GetLevelOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; default : throw new CommandException ( "Command: \"" + getName ( ) + "\", found unexpected opt: " + args [ getopt . getOptind ( ) - 1 ] ) ; } } }
/*
(non-Javadoc)

@see
org.mobicents.slee.tools.twiddle.AbstractSleeCommand#processArguments
(java.lang.String[])
/ * ( non - Javadoc )