MethodRef.java 829 B

123456789101112131415161718192021222324
  1. /**********************************************************************/
  2. /* Method Reference class for J2CPS */
  3. /* */
  4. /* (c) copyright QUT */
  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. public String toString() {
  15. this.Resolve();
  16. return ("<MethodReference> " + classIndex + " " + nameAndTypeIndex + " " +
  17. classRef.GetName() + "." + name + " " + type);
  18. }
  19. }