src/main/java/org/wymiwyg/commons/util/arguments/AnnotatedInterfaceArguments.java
public void process(List argumentList) throws InvalidArgumentsException {
		Set<Method> requiredArguments = new HashSet<Method>();
		NamedAttributeProcessor namedAttributeProcessor = new NamedAttributeProcessor();
		for (final Method m : annotated.getMethods()) {
			if (m.isAnnotationPresent(CommandLine.class)) {
				final CommandLine cl = m.getAnnotation(CommandLine.class);
				if (cl.required()) {
					requiredArguments.add(m);
				}
				for (final String longName : cl.longName()) {
					namedAttributeProcessor
							.addLongNameAttributeProcessor(new MySingleNamedAttributeProcessor(
									longName, cl, m));
				}
				for (final String shortName : cl.shortName()) {
					namedAttributeProcessor
							.addNamedAttributeProcessor(new MySingleNamedAttributeProcessor(
									shortName, cl, m));
				}
			}
		}
		Set<CommandLine> missingArguments = new HashSet<CommandLine>();
		namedAttributeProcessor.process(argumentList);
		for (Iterator<Method> iter = requiredArguments.iterator(); iter
				.hasNext();) {
			Method current = iter.next();
			if (!valueMap.containsKey(current)) {
				missingArguments.add(current.getAnnotation(CommandLine.class));
			}
		}
		if (missingArguments.size() > 0) {
			throw new MissingArgumentException(missingArguments);
		}
	}
public void process(List argumentList) throws InvalidArgumentsException {
		Set<Method> requiredArguments = new HashSet<Method>();
		NamedAttributeProcessor namedAttributeProcessor = new NamedAttributeProcessor();
		for (final Method m : annotated.getMethods()) {
			if (m.isAnnotationPresent(CommandLine.class)) {
				final CommandLine cl = m.getAnnotation(CommandLine.class);
				if (cl.required()) {
					requiredArguments.add(m);
				}
				for (final String longName : cl.longName()) {
					namedAttributeProcessor
							.addLongNameAttributeProcessor(new MySingleNamedAttributeProcessor(
									longName, cl, m));
				}
				for (final String shortName : cl.shortName()) {
					namedAttributeProcessor
							.addNamedAttributeProcessor(new MySingleNamedAttributeProcessor(
									shortName, cl, m));
				}
			}
		}
		Set<CommandLine> missingArguments = new HashSet<CommandLine>();
		namedAttributeProcessor.process(argumentList);
		for (Iterator<Method> iter = requiredArguments.iterator(); iter
				.hasNext();) {
			Method current = iter.next();
			if (!valueMap.containsKey(current)) {
				missingArguments.add(current.getAnnotation(CommandLine.class));
			}
		}
		if (missingArguments.size() > 0) {
			throw new MissingArgumentException(missingArguments);
		}
	}
public void process ( List argumentList ) throws InvalidArgumentsException { Set < Method > requiredArguments = new HashSet < Method > ( ) ; NamedAttributeProcessor namedAttributeProcessor = new NamedAttributeProcessor ( ) ; for ( final Method m : annotated . getMethods ( ) ) { if ( m . isAnnotationPresent ( CommandLine . class ) ) { final CommandLine cl = m . getAnnotation ( CommandLine . class ) ; if ( cl . required ( ) ) { requiredArguments . add ( m ) ; } for ( final String longName : cl . longName ( ) ) { namedAttributeProcessor . addLongNameAttributeProcessor ( new MySingleNamedAttributeProcessor ( longName , cl , m ) ) ; } for ( final String shortName : cl . shortName ( ) ) { namedAttributeProcessor . addNamedAttributeProcessor ( new MySingleNamedAttributeProcessor ( shortName , cl , m ) ) ; } } } Set < CommandLine > missingArguments = new HashSet < CommandLine > ( ) ; namedAttributeProcessor . process ( argumentList ) ; for ( Iterator < Method > iter = requiredArguments . iterator ( ) ; iter . hasNext ( ) ; ) { Method current = iter . next ( ) ; if ( ! valueMap . containsKey ( current ) ) { missingArguments . add ( current . getAnnotation ( CommandLine . class ) ) ; } } if ( missingArguments . size ( ) > 0 ) { throw new MissingArgumentException ( missingArguments ) ; } }
/*
(non-Javadoc)

@see org.wymiwyg.commons.util.arguments.ArgumentProcessor#process(java.util.List)
/ * ( non - Javadoc )