org.cojen.classfile.constant
Class ConstantNameAndTypeInfo

java.lang.Object
  extended by org.cojen.classfile.ConstantInfo
      extended by org.cojen.classfile.constant.ConstantNameAndTypeInfo

public class ConstantNameAndTypeInfo
extends ConstantInfo

This class corresponds to the CONSTANT_NameAndType_info structure as defined in section 4.4.6 of The Java Virtual Machine Specification.

Author:
Brian S O'Neill

Field Summary
 
Fields inherited from class org.cojen.classfile.ConstantInfo
TAG_CLASS, TAG_DOUBLE, TAG_FIELD, TAG_FLOAT, TAG_INTEGER, TAG_INTERFACE_METHOD, TAG_LONG, TAG_METHOD, TAG_NAME_AND_TYPE, TAG_STRING, TAG_UTF8
 
Constructor Summary
ConstantNameAndTypeInfo(ConstantPool cp, String name, Descriptor type)
           
ConstantNameAndTypeInfo(ConstantUTFInfo nameConstant, ConstantUTFInfo descConstant)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
           
 Descriptor getType()
           
 int hashCode()
           
 String toString()
           
 void writeTo(DataOutput dout)
           
 
Methods inherited from class org.cojen.classfile.ConstantInfo
getEntryCount, getIndex, hasPriority
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantNameAndTypeInfo

public ConstantNameAndTypeInfo(ConstantUTFInfo nameConstant,
                               ConstantUTFInfo descConstant)

ConstantNameAndTypeInfo

public ConstantNameAndTypeInfo(ConstantPool cp,
                               String name,
                               Descriptor type)
Method Detail

getName

public String getName()

getType

public Descriptor getType()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

writeTo

public void writeTo(DataOutput dout)
             throws IOException
Overrides:
writeTo in class ConstantInfo
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.