Home | History | Annotate | Download | only in constant
      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_InterfaceMethodref_info.java,v 1.1.1.1 2004/05/09 16:57:49 vlad_r Exp $
      8  */
      9 package com.vladium.jcd.cls.constant;
     10 
     11 import java.io.IOException;
     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 interface methods. The class_index item of a CONSTANT_InterfaceMethodref_info
     19  * structure must be an interface type that declares the given method.
     20  *
     21  * @see CONSTANT_ref_info
     22  * @see CONSTANT_Fieldref_info
     23  * @see CONSTANT_Methodref_info
     24  *
     25  * @author (C) 2001, Vlad Roubtsov
     26  */
     27 public
     28 final class CONSTANT_InterfaceMethodref_info extends CONSTANT_ref_info
     29 {
     30     // public: ................................................................
     31 
     32     public static final byte TAG = 11;
     33 
     34 
     35     public CONSTANT_InterfaceMethodref_info (final int class_index, final int name_and_type_index)
     36     {
     37         super (class_index, name_and_type_index);
     38     }
     39 
     40     public final byte tag ()
     41     {
     42         return TAG;
     43     }
     44 
     45     // Visitor:
     46 
     47     public Object accept (final ICONSTANTVisitor visitor, final Object ctx)
     48     {
     49         return visitor.visit (this, ctx);
     50     }
     51 
     52     public String toString ()
     53     {
     54         return "CONSTANT_InterfaceMethodref: [class_index = " + m_class_index + ", name_and_type_index = " + m_name_and_type_index + ']';
     55     }
     56 
     57     // Cloneable: inherited clone() is Ok
     58 
     59     // protected: .............................................................
     60 
     61 
     62     protected CONSTANT_InterfaceMethodref_info (final UDataInputStream bytes) throws IOException
     63     {
     64         super (bytes);
     65     }
     66 
     67     // package: ...............................................................
     68 
     69     // private: ...............................................................
     70 
     71 } // end of class
     72 // ----------------------------------------------------------------------------
     73