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