< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/RemappingMethodAdapter.java

Print this page




  52  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 
  60 package jdk.internal.org.objectweb.asm.commons;
  61 
  62 import jdk.internal.org.objectweb.asm.AnnotationVisitor;
  63 import jdk.internal.org.objectweb.asm.Handle;
  64 import jdk.internal.org.objectweb.asm.Label;
  65 import jdk.internal.org.objectweb.asm.MethodVisitor;
  66 import jdk.internal.org.objectweb.asm.Opcodes;
  67 import jdk.internal.org.objectweb.asm.TypePath;
  68 
  69 /**
  70  * A {@link LocalVariablesSorter} for type mapping.
  71  *

  72  * @author Eugene Kuleshov
  73  */

  74 public class RemappingMethodAdapter extends LocalVariablesSorter {
  75 
  76     protected final Remapper remapper;
  77 
  78     public RemappingMethodAdapter(final int access, final String desc,
  79             final MethodVisitor mv, final Remapper remapper) {
  80         this(Opcodes.ASM5, access, desc, mv, remapper);
  81     }
  82 
  83     protected RemappingMethodAdapter(final int api, final int access,
  84             final String desc, final MethodVisitor mv, final Remapper remapper) {
  85         super(api, access, desc, mv);
  86         this.remapper = remapper;
  87     }
  88 
  89     @Override
  90     public AnnotationVisitor visitAnnotationDefault() {
  91         AnnotationVisitor av = super.visitAnnotationDefault();
  92         return av == null ? av : new RemappingAnnotationAdapter(av, remapper);
  93     }




  52  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 
  60 package jdk.internal.org.objectweb.asm.commons;
  61 
  62 import jdk.internal.org.objectweb.asm.AnnotationVisitor;
  63 import jdk.internal.org.objectweb.asm.Handle;
  64 import jdk.internal.org.objectweb.asm.Label;
  65 import jdk.internal.org.objectweb.asm.MethodVisitor;
  66 import jdk.internal.org.objectweb.asm.Opcodes;
  67 import jdk.internal.org.objectweb.asm.TypePath;
  68 
  69 /**
  70  * A {@link LocalVariablesSorter} for type mapping.
  71  *
  72  * //@deprecated use {@link MethodRemapper} instead.
  73  * @author Eugene Kuleshov
  74  */
  75 //@Deprecated
  76 public class RemappingMethodAdapter extends LocalVariablesSorter {
  77 
  78     protected final Remapper remapper;
  79 
  80     public RemappingMethodAdapter(final int access, final String desc,
  81             final MethodVisitor mv, final Remapper remapper) {
  82         this(Opcodes.ASM5, access, desc, mv, remapper);
  83     }
  84 
  85     protected RemappingMethodAdapter(final int api, final int access,
  86             final String desc, final MethodVisitor mv, final Remapper remapper) {
  87         super(api, access, desc, mv);
  88         this.remapper = remapper;
  89     }
  90 
  91     @Override
  92     public AnnotationVisitor visitAnnotationDefault() {
  93         AnnotationVisitor av = super.visitAnnotationDefault();
  94         return av == null ? av : new RemappingAnnotationAdapter(av, remapper);
  95     }


< prev index next >