VariableTable { public Variable getArgument(int index) { Validate.isTrue(index >= 0 && index < argVars.size()); return argVars.get(index); } VariableTable(ClassNode classNode, MethodNode methodNode); private  VariableTable(boolean isStatic, Type objectType, Type methodType, int maxLocals); Variable getArgument(int index); Variable acquireExtra(Class<?> type); Variable acquireExtra(Type type); void releaseExtra(Variable variable); int getArgCount();  }
@Test public void mustBeAbleToAccessThisReference() { VariableTable fixture = new VariableTable(classNode, methodNode); Variable var = fixture.getArgument(0); assertEquals(var.getType(), Type.getObjectType(classNode.name)); assertEquals(var.getIndex(), 0); assertTrue(var.isUsed()); }
@Test public void mustBeAbleToAccessParameter() { methodNode.desc = Type.getMethodDescriptor(Type.VOID_TYPE, Type.LONG_TYPE); VariableTable fixture = new VariableTable(classNode, methodNode); Variable var = fixture.getArgument(1); assertEquals(var.getType(), Type.LONG_TYPE); assertEquals(var.getIndex(), 1); assertTrue(var.isUsed()); }