1/* Copyright (C) 2003 Vladimir Roubtsov. All rights reserved.
2 *
3 * This program and the accompanying materials are made available under
4 * the terms of the Common Public License v1.0 which accompanies this distribution,
5 * and is available at http://www.eclipse.org/legal/cpl-v10.html
6 *
7 * $Id: CONSTANT_Methodref_info.java,v 1.1.1.1 2004/05/09 16:57:49 vlad_r Exp $
8 */
9package com.vladium.jcd.cls.constant;
10
11import java.io.IOException;
12
13import com.vladium.jcd.lib.UDataInputStream;
14
15// ----------------------------------------------------------------------------
16/**
17 * This structure is used in the constant pool to represent dynamic references
18 * to class methods. The class_index item of a {@link CONSTANT_Fieldref_info} or
19 * a CONSTANT_Methodref_info structure must be a class type, not an interface type.
20 *
21 * @see CONSTANT_ref_info
22 * @see CONSTANT_Fieldref_info
23 * @see CONSTANT_InterfaceMethodref_info
24 *
25 * @author (C) 2001, Vlad Roubtsov
26 */
27public
28final class CONSTANT_Methodref_info extends CONSTANT_ref_info
29{
30    // public: ................................................................
31
32    public static final byte TAG = 10;
33
34
35    public CONSTANT_Methodref_info (final int class_index, final int name_and_type_index)
36    {
37        super (class_index, name_and_type_index);
38    }
39
40
41    public final byte tag ()
42    {
43        return TAG;
44    }
45
46    // Visitor:
47
48    public Object accept (final ICONSTANTVisitor visitor, final Object ctx)
49    {
50        return visitor.visit (this, ctx);
51    }
52
53    public String toString ()
54    {
55        return "CONSTANT_Methodref_info: [class_index = " + m_class_index + ", name_and_type_index = " + m_name_and_type_index + ']';
56    }
57
58    // Cloneable: inherited clone() is Ok
59
60    // protected: .............................................................
61
62
63    protected CONSTANT_Methodref_info (final UDataInputStream bytes) throws IOException
64    {
65        super (bytes);
66    }
67
68    // package: ...............................................................
69
70    // private: ...............................................................
71
72} // end of class
73// ----------------------------------------------------------------------------
74