MethodRef.java 843 B

12345678910111213141516171819202122232425
  1. /**********************************************************************/
  2. /* Method Reference class for j2cps */
  3. /* */
  4. /* (c) copyright QUT, John Gough 2000-2012, John Gough, 2012-2017 */
  5. /**********************************************************************/
  6. package j2cps;
  7. public class MethodRef extends Reference {
  8. public MethodRef(ConstantPool thisCp, int classIndex, int ntIndex) {
  9. super(thisCp,classIndex,ntIndex);
  10. }
  11. public String getMethodName() {
  12. return (classRef.GetName() + "." + name + type);
  13. }
  14. @Override
  15. public String toString() {
  16. this.Resolve();
  17. return ("<MethodReference> " + classIndex + " " + nameAndTypeIndex + " " +
  18. classRef.GetName() + "." + name + " " + type);
  19. }
  20. }