public class ArgsTest {

    private List <Object> args;
private ArgsTestCheckPoint checkPoint;
public enum ArgsTestCheckPoint
{
IS_NAME_CORRECT,IS_PASSWORD_CORRECT
} ArgsTest(ArgsTestCheckPoint checkPoint, Object ...objs) {
this.checkPoint=checkPoint;
for(Object obj:objs)
{
System.out.println(obj);
args.add(obj);
} }
public void perform() throws Exception
{
switch (checkPoint)
{
case IS_NAME_CORRECT:System.out.println((String)args.get(0)+(Integer)args.get(1));
break;
case IS_PASSWORD_CORRECT:System.out.println((Integer)args.get(0)+(String)args.get(1));
break;
default: }
} }
04-14 11:08