com.vladium.jcd.cls.constant
Class CONSTANT_NameAndType_info

java.lang.Object
  extended bycom.vladium.jcd.cls.constant.CONSTANT_info
      extended bycom.vladium.jcd.cls.constant.CONSTANT_NameAndType_info
All Implemented Interfaces:
java.lang.Cloneable, IClassFormatOutput

public final class CONSTANT_NameAndType_info
extends CONSTANT_info

The CONSTANT_NameAndType_info structure is used to represent a field or method, without indicating which class or interface type it belongs to.

The value of the name_index item must be a valid index into the constant pool table. The constant pool entry at that index must be a CONSTANT_Utf8_info structure representing a valid Java field name or method name stored as a simple (not fully qualified) name, that is, as a Java identifier.

The value of the descriptor_index item must be a valid index into the constant pool table. The constant pool entry at that index must be a CONSTANT_Utf8_info structure representing a valid Java field descriptor or method descriptor.

Author:
(C) 2001, Vlad Roubtsov

Field Summary
 int m_descriptor_index
           
 int m_name_index
           
static byte TAG
           
 
Constructor Summary
  CONSTANT_NameAndType_info(int name_index, int descriptor_index)
           
protected CONSTANT_NameAndType_info(UDataInputStream bytes)
           
 
Method Summary
 java.lang.Object accept(ICONSTANTVisitor visitor, java.lang.Object ctx)
           
 java.lang.String getDescriptor(ClassDef cls)
           
 java.lang.String getName(ClassDef cls)
           
 byte tag()
          Returns the tag byte for this CONSTANT type [this data is static class data].
 java.lang.String toString()
           
 void writeInClassFormat(UDataOutputStream out)
           
 
Methods inherited from class com.vladium.jcd.cls.constant.CONSTANT_info
clone, new_CONSTANT_info, tagToString, width
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG

public static final byte TAG
See Also:
Constant Field Values

m_name_index

public int m_name_index

m_descriptor_index

public int m_descriptor_index
Constructor Detail

CONSTANT_NameAndType_info

public CONSTANT_NameAndType_info(int name_index,
                                 int descriptor_index)

CONSTANT_NameAndType_info

protected CONSTANT_NameAndType_info(UDataInputStream bytes)
                             throws java.io.IOException
Method Detail

tag

public final byte tag()
Description copied from class: CONSTANT_info
Returns the tag byte for this CONSTANT type [this data is static class data].

Specified by:
tag in class CONSTANT_info

getName

public java.lang.String getName(ClassDef cls)

getDescriptor

public java.lang.String getDescriptor(ClassDef cls)

accept

public java.lang.Object accept(ICONSTANTVisitor visitor,
                               java.lang.Object ctx)
Specified by:
accept in class CONSTANT_info

toString

public java.lang.String toString()
Specified by:
toString in class CONSTANT_info

writeInClassFormat

public void writeInClassFormat(UDataOutputStream out)
                        throws java.io.IOException
Specified by:
writeInClassFormat in interface IClassFormatOutput
Overrides:
writeInClassFormat in class CONSTANT_info
Throws:
java.io.IOException