FileDocCategorySizeDatePackage
CONSTANT_Class_info.javaAPI DocAndroid 1.5 API2875Wed May 06 22:41:16 BST 2009com.vladium.jcd.cls.constant

CONSTANT_Class_info

public final class CONSTANT_Class_info extends CONSTANT_info
The CONSTANT_Class_info structure is used to represent a class or an interface.

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 {@link CONSTANT_Utf8_info} structure representing a valid fully qualified Java class name that has been converted to the class file's internal form.

author
(C) 2001, Vlad Roubtsov

Fields Summary
public static final byte
TAG
public int
m_name_index
Constructors Summary
public CONSTANT_Class_info(int name_index)

    
    
        
    
        m_name_index = name_index;
    
protected CONSTANT_Class_info(com.vladium.jcd.lib.UDataInputStream bytes)

        m_name_index = bytes.readU2 ();
    
Methods Summary
public java.lang.Objectaccept(ICONSTANTVisitor visitor, java.lang.Object ctx)

        return visitor.visit (this, ctx);
    
public java.lang.StringgetName(com.vladium.jcd.cls.ClassDef cls)
Returns the JVM class name within the constant pool context of 'cls' class definition.

param
cls class that contains this constant
return
class name [in JVM format]

        return ((CONSTANT_Utf8_info) cls.getConstants ().get (m_name_index)).m_value;
    
public final bytetag()

        return TAG;
    
public java.lang.StringtoString()

        return "CONSTANT_Class: [name_index = " + m_name_index + ']";
    
public voidwriteInClassFormat(com.vladium.jcd.lib.UDataOutputStream out)

        super.writeInClassFormat (out);
        
        out.writeU2 (m_name_index);