Constructor and Description |
---|
CfFieldOrMethod(ClassFile classFile)
Create a new field or method belonging to the given Classfile.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
public CfFieldOrMethod(ClassFile classFile)
public void read(java.io.DataInputStream dataIn) throws java.io.IOException, ClassFileFormatException
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]; }
java.io.IOException
ClassFileFormatException
public void write(java.io.DataOutput dout) throws java.io.IOException
Subclasses must override this and extend the behavior by writing the attribute table.
dout
- java.io.IOException
public ClassFile getClassFile()
public ConstantPool getConstantPool()
public int getNameIndex()
public void setNameIndex(int nameIndex)
public java.lang.String getName()
public int getDescriptorIndex()
public void setDescriptorIndex(int descriptorIndex)
public java.lang.String getSignature()
public boolean isSynthetic()
public void setSynthetic(boolean synthetic)
Copyright ? 2000-2003 Clarity Systems Group, LLC. All Rights Reserved.