For interface bridges, using invokesuper will fail since the method being bridged to is in a superinterface, not a superclass. Starting in Java 8, javac emits default bridge methods in interfaces, which use invokeinterface to bridge to the target method.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ClassLoader | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Map |
| classLoader | back to summary |
|---|---|
| private final ClassLoader classLoader | |
| declToBridge | back to summary |
|---|---|
| private final Map<K, V> declToBridge | |
| BridgeMethodResolver | back to summary |
|---|---|
| public BridgeMethodResolver(Map<K, V> declToBridge, ClassLoader classLoader) | |
| resolveAll | back to summary |
|---|---|
| public Map Finds all bridge methods that are being called with invokespecial & returns them. | |
| Modifier and Type | Field and Description |
|---|---|
| private Signature | |
| private Set | |
| private Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | visit(int
the class version. The minor version is stored in the 16 most significant bits,
and the major version in the 16 least significant bits. version, int the class's access flags (see access, String Opcodes). This parameter also indicates if
the class is deprecated Opcodes#ACC_DEPRECATED or a record Opcodes#ACC_RECORD.the internal name of the class (see name, String Type#getInternalName()).the signature of this class. May be null if the class is not a
generic one, and does not extend or implement generic classes or interfaces. signature, String the internal of name of the super class (see superName, String[] Type#getInternalName()).
For interfaces, the super class is Object. May be null, but only for the
Object class.the internal names of the class's interfaces (see interfaces)Type#getInternalName()). May be null.Overrides org. Visits the header of the class. |
| public MethodVisitor | visitMethod(int
the method's access flags (see access, String Opcodes). This parameter also indicates if
the method is synthetic and/or deprecated.the method's name. name, String the method's descriptor (see desc, String Type).the method's signature. May be null if the method parameters,
return type and exceptions do not use generic types. signature, String[] the internal names of the method's exception classes (see exceptions)Type#getInternalName()). May be null.Overrides org. Visits a method of the class. |
| currentMethod | back to summary |
|---|---|
| private Signature currentMethod | |
| eligibleMethods | back to summary |
|---|---|
| private Set<E> eligibleMethods | |
| resolved | back to summary |
|---|---|
| private Map<K, V> resolved | |
| BridgedFinder | back to summary |
|---|---|
| pack-priv BridgedFinder(Set<E> eligibleMethods, Map<K, V> resolved) | |
| visit | back to summary |
|---|---|
| public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) Overrides org. Doc from org. Visits the header of the class.
| |
| visitMethod | back to summary |
|---|---|
| public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) Overrides org. Doc from org. Visits a method of the class. This method must return a new
| |