com.claritysys.jvm.classfile
Class CfFieldOrMethod

java.lang.Object
  extended by com.claritysys.jvm.classfile.CfEntry
      extended by com.claritysys.jvm.classfile.CfFieldOrMethod
Direct Known Subclasses:
CfField, CfMethod

public class CfFieldOrMethod
extends CfEntry


Constructor Summary
CfFieldOrMethod(ClassFile classFile)
          Create a new field or method belonging to the given Classfile.
 
Method Summary
 ClassFile getClassFile()
           
 ConstantPool getConstantPool()
           
 int getDescriptorIndex()
           
 java.lang.String getName()
           
 int getNameIndex()
           
 java.lang.String getSignature()
           
 boolean isSynthetic()
           
 void read(java.io.DataInputStream dataIn)
          Read the member from the given stream, overwriting any previous values.
 void setDescriptorIndex(int descriptorIndex)
           
 void setNameIndex(int nameIndex)
           
 void setSynthetic(boolean synthetic)
           
 void write(java.io.DataOutput dout)
          Write the field or method to a stream in JVM classfile format.
 
Methods inherited from class com.claritysys.jvm.classfile.CfEntry
getAccessFlags, getAttributeCount, getAttributes, isAbstract, isDeprecated, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, setAbstract, setAccessFlags, setAttributes, setDeprecated, setFinal, setInterface, setNative, setPrivate, setProtected, setPublic, setStatic, setStrict, setSynchronized, setTransient, setVolatile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CfFieldOrMethod

public CfFieldOrMethod(ClassFile classFile)
Create a new field or method belonging to the given Classfile.

Method Detail

read

public void read(java.io.DataInputStream dataIn)
          throws java.io.IOException,
                 ClassFileFormatException
Read the member from the given stream, overwriting any previous values.

Subclasses must override this method, first invoking this one, and then processing attributes.

  field_info {
          u2 access_flags;
          u2 name_index;
          u2 descriptor_index;
          u2 attributes_count;
          attribute_info attributes[attributes_count];
 }

  method_info {
      u2 access_flags;
            u2 name_index;
            u2 descriptor_index;
            u2 attributes_count;
            attribute_info attributes[attributes_count];
 }
 

Throws:
java.io.IOException
ClassFileFormatException

write

public void write(java.io.DataOutput dout)
           throws java.io.IOException
Write the field or method to a stream in JVM classfile format.

Subclasses must override this and extend the behavior by writing the attribute table.

Parameters:
dout -
Throws:
java.io.IOException

getClassFile

public ClassFile getClassFile()

getConstantPool

public ConstantPool getConstantPool()

getNameIndex

public int getNameIndex()

setNameIndex

public void setNameIndex(int nameIndex)

getName

public java.lang.String getName()

getDescriptorIndex

public int getDescriptorIndex()

setDescriptorIndex

public void setDescriptorIndex(int descriptorIndex)

getSignature

public java.lang.String getSignature()

isSynthetic

public boolean isSynthetic()

setSynthetic

public void setSynthetic(boolean synthetic)


Copyright ? 2000-2003 Clarity Systems Group, LLC. All Rights Reserved.