KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > vladium > jcd > cls > constant > CONSTANT_Fieldref_info


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_Fieldref_info.java,v 1.1.1.1 2004/05/09 16:57:48 vlad_r Exp $
8  */

9 package com.vladium.jcd.cls.constant;
10
11 import java.io.IOException JavaDoc;
12
13 import com.vladium.jcd.lib.UDataInputStream;
14
15 // ----------------------------------------------------------------------------
16
/**
17  * This structure is used in the constant pool to represent dynamic references
18  * to fields. The class_index item of a CONSTANT_Fieldref_info or a
19  * {@link CONSTANT_Methodref_info} structure must be a class type, not an
20  * interface type.
21  *
22  * @see CONSTANT_ref_info
23  * @see CONSTANT_Methodref_info
24  * @see CONSTANT_InterfaceMethodref_info
25  *
26  * @author (C) 2001, Vlad Roubtsov
27  */

28 public
29 final class CONSTANT_Fieldref_info extends CONSTANT_ref_info
30 {
31     // public: ................................................................
32

33     public static final byte TAG = 9;
34     
35     
36     public CONSTANT_Fieldref_info (final int class_index, final int name_and_type_index)
37     {
38         super (class_index, name_and_type_index);
39     }
40
41     public final byte tag ()
42     {
43         return TAG;
44     }
45     
46     // Visitor:
47

48     public Object JavaDoc accept (final ICONSTANTVisitor visitor, final Object JavaDoc ctx)
49     {
50         return visitor.visit (this, ctx);
51     }
52     
53     public String JavaDoc toString ()
54     {
55         return "CONSTANT_Fieldref: [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_Fieldref_info (final UDataInputStream bytes) throws IOException JavaDoc
64     {
65         super (bytes);
66     }
67     
68     // package: ...............................................................
69

70     // private: ...............................................................
71

72 } // end of class
73
// ----------------------------------------------------------------------------
74
Popular Tags