Example #1
0
 static void addPatches(final ScriptManager sm, final boolean ecj) {
   final String HOOK_NAME = PatchFunction.class.getName();
   sm.addScript(
       exitEarly()
           .target(new MethodTarget(CLASSSCOPE, "buildFieldsAndMethods", "void"))
           .request(StackRequest.THIS)
           .decisionMethod(
               new Hook(HOOK_NAME, "onClassScope_buildFieldsAndMethods", "boolean", CLASSSCOPE))
           .build());
 }
Example #2
0
 static void addPatches(final ScriptManager sm, final boolean ecj) {
   final String HOOK_NAME = PatchYield.class.getName();
   sm.addScript(
       ScriptBuilder.exitEarly()
           .target(new MethodTarget(ABSTRACTMETHODDECLARATION, "resolveStatements", "void"))
           .request(StackRequest.THIS)
           .decisionMethod(
               new Hook(
                   HOOK_NAME,
                   "onAbstractMethodDeclaration_resolveStatements",
                   "boolean",
                   ABSTRACTMETHODDECLARATION))
           .build());
 }