1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.jdo.impl.enhancer.classfile;
20
21 import java.io.*;
22
23 /***
24 * Class representing a reference to a method of some class in the
25 * constant pool of a class file
26 */
27 public class ConstMethodRef extends ConstBasicMemberRef {
28
29 public static final int MyTag = CONSTANTMethodRef;
30
31
32
33 /***
34 * The tag of this constant entry
35 */
36 public int tag () { return MyTag; }
37
38 /***
39 * A printable representation
40 */
41 public String toString () {
42 return "CONSTANTMethodRef(" + indexAsString() + "): " +
43 super.toString();
44 }
45
46 /* package local methods *//package-summary/html">class="comment"> package local methods *//package-summary.html">
47
48 ConstMethodRef (ConstClass cname, ConstNameAndType NT) {
49 super(cname, NT);
50 }
51
52 ConstMethodRef (int cnameIndex, int NT_index) {
53 super(cnameIndex, NT_index);
54 }
55
56 static ConstMethodRef read (DataInputStream input) throws IOException {
57 int cname = input.readUnsignedShort();
58 int NT = input.readUnsignedShort();
59 return new ConstMethodRef (cname, NT);
60 }
61 }