< prev index next >
src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InvokeInstruction.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
--- 1,7 ----
/*
! * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*** 28,39 ****
import com.sun.org.apache.bcel.internal.classfile.ConstantPool;
/**
* Super class for the INVOKExxx family of instructions.
*
! * @version $Id$
! * @LastModified: Jun 2019
*/
public abstract class InvokeInstruction extends FieldOrMethod implements ExceptionThrower,
StackConsumer, StackProducer {
/**
--- 28,38 ----
import com.sun.org.apache.bcel.internal.classfile.ConstantPool;
/**
* Super class for the INVOKExxx family of instructions.
*
! * @LastModified: Jan 2020
*/
public abstract class InvokeInstruction extends FieldOrMethod implements ExceptionThrower,
StackConsumer, StackProducer {
/**
*** 57,68 ****
*/
@Override
public String toString( final ConstantPool cp ) {
final Constant c = cp.getConstant(super.getIndex());
final StringTokenizer tok = new StringTokenizer(cp.constantToString(c));
! return Const.getOpcodeName(super.getOpcode()) + " " + tok.nextToken().replace('.', '/')
! + tok.nextToken();
}
/**
* Also works for instructions whose stack effect depends on the
--- 56,78 ----
*/
@Override
public String toString( final ConstantPool cp ) {
final Constant c = cp.getConstant(super.getIndex());
final StringTokenizer tok = new StringTokenizer(cp.constantToString(c));
!
! final String opcodeName = Const.getOpcodeName(super.getOpcode());
!
! final StringBuilder sb = new StringBuilder(opcodeName);
! if (tok.hasMoreTokens()) {
! sb.append(" ");
! sb.append(tok.nextToken().replace('.', '/'));
! if (tok.hasMoreTokens()) {
! sb.append(tok.nextToken());
! }
! }
!
! return sb.toString();
}
/**
* Also works for instructions whose stack effect depends on the
< prev index next >