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 */ 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 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 */ 28public 29final 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 accept (final ICONSTANTVisitor visitor, final Object ctx) 49 { 50 return visitor.visit (this, ctx); 51 } 52 53 public String 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 64 { 65 super (bytes); 66 } 67 68 // package: ............................................................... 69 70 // private: ............................................................... 71 72} // end of class 73// ---------------------------------------------------------------------------- 74