-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes bytecode references to `java.lang.invoke.MethodHandles.Lookup…
…` on Java 6 and older Fixes #61
- Loading branch information
Showing
8 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../src/main/java/net/orfjackal/retrolambda/lambdas/RemoveMethodHandlesLookupReferences.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright © 2013-2015 Esko Luontola <www.orfjackal.net> | ||
// This software is released under the Apache License 2.0. | ||
// The license text is at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
package net.orfjackal.retrolambda.lambdas; | ||
|
||
import org.objectweb.asm.*; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
|
||
import static org.objectweb.asm.Opcodes.ASM5; | ||
|
||
public class RemoveMethodHandlesLookupReferences extends ClassVisitor { | ||
|
||
private static final String METHOD_HANDLES_LOOKUP = Type.getType(MethodHandles.Lookup.class).getInternalName(); | ||
|
||
public RemoveMethodHandlesLookupReferences(ClassVisitor next) { | ||
super(ASM5, next); | ||
} | ||
|
||
@Override | ||
public void visitInnerClass(String name, String outerName, String innerName, int access) { | ||
if (!name.equals(METHOD_HANDLES_LOOKUP)) { | ||
super.visitInnerClass(name, outerName, innerName, access); | ||
} | ||
} | ||
} |