@Test public void testParseTargetMethodAnnotations() throws Exception { SootMethod m = toSootClass(Runners.class).getMethodByName("runner1"); assertArrayEquals(new String[][] {{}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 0, "")); assertArrayEquals(new String[][] {{}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 0, " ")); assertArrayEquals(new String[][] {{}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 0, "()")); assertArrayEquals(new String[][] {{BY_VAL, POINTER}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 0, "@Pointer@ByVal")); assertArrayEquals(new String[][] {{BY_VAL, POINTER}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 0, "@Pointer @ByVal ()")); assertArrayEquals(new String[][] {{BY_VAL, POINTER}, {BY_REF}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 1, "@Pointer @ByVal (@ByRef)")); assertArrayEquals(new String[][] {{BY_VAL, POINTER}, {BY_REF, POINTER}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 1, "@Pointer @ByVal ( @ByRef @Pointer )")); assertArrayEquals(new String[][] {{BY_VAL, POINTER}, {BY_REF, POINTER}, {MACHINE_SIZED_S_INT}, {}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 3, "@Pointer @ByVal ( @ByRef @Pointer , @MachineSizedSInt , )")); assertArrayEquals(new String[][] {{BY_VAL, POINTER}, {}, {BY_REF, POINTER}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 2, "@Pointer @ByVal(,@ByRef @Pointer)")); assertArrayEquals(new String[][] {{}, {BY_REF, POINTER}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 1, "(@ByRef @Pointer) ")); assertArrayEquals(new String[][] {{}, {BLOCK, BY_REF, BY_VAL, MACHINE_SIZED_FLOAT, MACHINE_SIZED_S_INT, MACHINE_SIZED_U_INT, POINTER}}, ObjCBlockPlugin.parseTargetMethodAnnotations(m, 1, "(@ByRef @ByVal @Pointer @MachineSizedFloat @MachineSizedSInt " + "@MachineSizedUInt @Block) ")); }
protected static String[][] parseTargetMethodAnnotations(SootMethod m, String value) { return parseTargetMethodAnnotations(m, m.getParameterCount(), value); }
ObjCBlockPlugin extends AbstractCompilerPlugin { protected static String[][] parseTargetMethodAnnotations(SootMethod m, String value) { return parseTargetMethodAnnotations(m, m.getParameterCount(), value); } }
ObjCBlockPlugin extends AbstractCompilerPlugin { protected static String[][] parseTargetMethodAnnotations(SootMethod m, String value) { return parseTargetMethodAnnotations(m, m.getParameterCount(), value); }  }
ObjCBlockPlugin extends AbstractCompilerPlugin { protected static String[][] parseTargetMethodAnnotations(SootMethod m, String value) { return parseTargetMethodAnnotations(m, m.getParameterCount(), value); }  @Override void beforeClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder); }
ObjCBlockPlugin extends AbstractCompilerPlugin { protected static String[][] parseTargetMethodAnnotations(SootMethod m, String value) { return parseTargetMethodAnnotations(m, m.getParameterCount(), value); }  @Override void beforeClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder); static final String OBJC_PACKAGE; static final String OBJC_ANNOTATIONS_PACKAGE; static final String BLOCK; static final String RUNNABLE_AS_OBJC_BLOCK_MARSHALER; }