aboutsummaryrefslogtreecommitdiff
path: root/src/netbeansAgent
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbeansAgent')
-rw-r--r--src/netbeansAgent/lombok/netbeans/agent/NetbeansPatcher.java45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/netbeansAgent/lombok/netbeans/agent/NetbeansPatcher.java b/src/netbeansAgent/lombok/netbeans/agent/NetbeansPatcher.java
index e6ae5c03..ffe491ae 100644
--- a/src/netbeansAgent/lombok/netbeans/agent/NetbeansPatcher.java
+++ b/src/netbeansAgent/lombok/netbeans/agent/NetbeansPatcher.java
@@ -58,28 +58,28 @@ public class NetbeansPatcher extends Agent {
sm.addScript(ScriptBuilder.exitEarly()
.transplant().request(StackRequest.PARAM1, StackRequest.PARAM2)
.target(new MethodTarget("org.netbeans.StandardModule$OneModuleClassLoader", "<init>"))
- .decisionMethod(new Hook("lombok/netbeans/agent/PatchFixes", "addSelfToClassLoader", "(Lorg/netbeans/Module;Ljava/util/List;)V"))
+ .decisionMethod(new Hook("lombok.netbeans.agent.PatchFixes", "addSelfToClassLoader", "void", "org.netbeans.Module", "java.util.List"))
.build());
sm.addScript(ScriptBuilder.exitEarly()
.transplant()
.request(StackRequest.THIS, StackRequest.PARAM1)
.target(new MethodTarget("org.netbeans.ProxyClassLoader", "getResource"))
- .decisionMethod(new Hook("lombok/netbeans/agent/PatchFixes", "getResource_decision", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Z"))
- .valueMethod(new Hook("lombok/netbeans/agent/PatchFixes", "getResource_value", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/net/URL;"))
+ .decisionMethod(new Hook("lombok.netbeans.agent.PatchFixes", "getResource_decision", "boolean", "java.lang.ClassLoader", "java.lang.String"))
+ .valueMethod(new Hook("lombok.netbeans.agent.PatchFixes", "getResource_value", "java.net.URL", "java.lang.ClassLoader", "java.lang.String"))
.build());
sm.addScript(ScriptBuilder.exitEarly()
.transplant()
.request(StackRequest.THIS, StackRequest.PARAM1)
.target(new MethodTarget("org.netbeans.ProxyClassLoader", "getResources"))
- .decisionMethod(new Hook("lombok/netbeans/agent/PatchFixes", "getResources_decision", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Z"))
- .valueMethod(new Hook("lombok/netbeans/agent/PatchFixes", "getResources_value", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/util/Enumeration;"))
+ .decisionMethod(new Hook("lombok.netbeans.agent.PatchFixes", "getResources_decision", "boolean", "java.lang.ClassLoader", "java.lang.String"))
+ .valueMethod(new Hook("lombok.netbeans.agent.PatchFixes", "getResources_value", "java.util.Enumeration", "java.lang.ClassLoader", "java.lang.String"))
.build());
sm.addScript(ScriptBuilder.exitEarly()
.transplant()
.target(new MethodTarget("org.netbeans.ProxyClassLoader", "loadClass"))
.request(StackRequest.THIS, StackRequest.PARAM1)
- .decisionMethod(new Hook("lombok/netbeans/agent/PatchFixes", "loadClass_decision", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Z"))
- .valueMethod(new Hook("lombok/netbeans/agent/PatchFixes", "loadClass_value", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class;"))
+ .decisionMethod(new Hook("lombok.netbeans.agent.PatchFixes", "loadClass_decision", "boolean", "java.lang.ClassLoader", "java.lang.String"))
+ .valueMethod(new Hook("lombok.netbeans.agent.PatchFixes", "loadClass_value", "java.lang.Class", "java.lang.ClassLoader", "java.lang.String"))
.build());
}
@@ -88,8 +88,8 @@ public class NetbeansPatcher extends Agent {
.request(StackRequest.THIS, StackRequest.PARAM1)
.transplant()
.target(new MethodTarget("com.sun.tools.javac.api.JavacTaskImpl", "setTaskListener"))
- .wrapMethod(new Hook("lombok/netbeans/agent/PatchFixes", "fixContentOnSetTaskListener",
- "(Lcom/sun/tools/javac/api/JavacTaskImpl;Lcom/sun/source/util/TaskListener;)V"))
+ .wrapMethod(new Hook("lombok.netbeans.agent.PatchFixes", "fixContentOnSetTaskListener", "void",
+ "com.sun.tools.javac.api.JavacTaskImpl", "com.sun.source.util.TaskListener"))
.build());
sm.addScript(ScriptBuilder.wrapReturnValue()
@@ -99,8 +99,8 @@ public class NetbeansPatcher extends Agent {
"com.sun.tools.javac.api.JavacTaskImpl",
"org.netbeans.api.java.source.ClasspathInfo", "javax.tools.DiagnosticListener", "java.lang.String", "boolean",
"com.sun.tools.javac.api.ClassNamesForFileOraculum", "com.sun.tools.javac.util.CancelService"))
- .wrapMethod(new Hook("lombok/netbeans/agent/PatchFixes", "addTaskListenerWhenCallingJavac",
- "(Lcom/sun/tools/javac/api/JavacTaskImpl;Lorg/netbeans/api/java/source/ClasspathInfo;)V"))
+ .wrapMethod(new Hook("lombok.netbeans.agent.PatchFixes", "addTaskListenerWhenCallingJavac", "void",
+ "com.sun.tools.javac.api.JavacTaskImpl", "org.netbeans.api.java.source.ClasspathInfo"))
.build());
}
@@ -108,28 +108,27 @@ public class NetbeansPatcher extends Agent {
sm.addScript(ScriptBuilder.replaceMethodCall()
.target(new MethodTarget("org.netbeans.modules.java.editor.overridden.ComputeAnnotations",
"createAnnotations"))
- .methodToReplace(new Hook("com/sun/source/util/Trees", "getTree",
- "(Ljavax/lang/model/element/Element;)Lcom/sun/source/tree/Tree;"))
- .replacementMethod(new Hook("lombok/netbeans/agent/PatchFixes", "returnNullForGeneratedNode",
- "(Lcom/sun/source/util/Trees;Ljavax/lang/model/element/Element;Ljava/lang/Object;)" +
- "Lcom/sun/source/tree/Tree;"))
+ .methodToReplace(new Hook("com.sun.source.util.Trees", "getTree", "com.sun.source.tree.Tree",
+ "javax.lang.model.element.Element"))
+ .replacementMethod(new Hook("lombok.netbeans.agent.PatchFixes", "returnNullForGeneratedNode", "com.sun.source.tree.Tree",
+ "com.sun.source.util.Trees", "javax.lang.model.element.Element", "java.lang.Object"))
.requestExtra(StackRequest.PARAM1).transplant()
.build());
sm.addScript(ScriptBuilder.replaceMethodCall()
.target(new MethodTarget("org.netbeans.modules.java.source.parsing.FindMethodRegionsVisitor",
"visitMethod"))
- .methodToReplace(new Hook("com/sun/source/util/SourcePositions", "getEndPosition",
- "(Lcom/sun/source/tree/CompilationUnitTree;Lcom/sun/source/tree/Tree;)J"))
- .replacementMethod(new Hook("lombok/netbeans/agent/PatchFixes", "returnMinus1ForGeneratedNode",
- "(Lcom/sun/source/util/SourcePositions;Lcom/sun/source/tree/CompilationUnitTree;Lcom/sun/source/tree/Tree;)J"))
+ .methodToReplace(new Hook("com.sun.source.util.SourcePositions", "getEndPosition", "long",
+ "com.sun.source.tree.CompilationUnitTree", "com.sun.source.tree.Tree"))
+ .replacementMethod(new Hook("lombok.netbeans.agent.PatchFixes", "returnMinus1ForGeneratedNode", "long",
+ "com.sun.source.util.SourcePositions", "com.sun.source.tree.CompilationUnitTree", "com.sun.source.tree.Tree"))
.transplant().build());
sm.addScript(ScriptBuilder.wrapMethodCall()
.target(new MethodTarget("org.netbeans.modules.java.source.save.CasualDiff", "filterHidden"))
- .methodToWrap(new Hook("java/lang/Iterable", "iterator", "()L/java/util/Iterator;"))
- .wrapMethod(new Hook("lombok/netbeans/agent/PatchFixes", "filterGenerated",
- "(Ljava/util/Iterator;)L/java/util/Iterator;"))
+ .methodToWrap(new Hook("java.lang.Iterable", "iterator", "java.util.Iterator"))
+ .wrapMethod(new Hook("lombok.netbeans.agent.PatchFixes", "filterGenerated", "java.util.Iterator",
+ "java.util.Iterator"))
.transplant().build());
}
}