alt.jiapi.file
Class ProgramElement
java.lang.Object
alt.jiapi.file.ProgramElement
- Direct Known Subclasses:
- ClassFile, Field, Method
public class ProgramElement
- extends java.lang.Object
This class holds mainly attribute reading and writing of program elements of class file.
Program elements are class, methods and fields.
- Author:
- Mika Riekkinen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
access_flags
protected short access_flags
attributes
protected java.util.List attributes
constantPool
protected ConstantPool constantPool
ProgramElement
protected ProgramElement(ConstantPool constantPool)
ProgramElement
protected ProgramElement(ConstantPool constantPool,
short access_flags)
ProgramElement
protected ProgramElement(ConstantPool constantPool,
short access_flags,
java.util.List attributes)
getAccessFlags
public short getAccessFlags()
getAttribute
public Attribute getAttribute(java.lang.String name)
- Gets a named attribute from this ProgramElement.
- Parameters:
name
- Name of the attribute
- Returns:
- Attribute found, or null if there was no attribute of given name
getAttributes
public java.util.List getAttributes()
- Gets all the class level attributes of this ClassFile.
- Returns:
- a List of Attributes
getConstantPool
public ConstantPool getConstantPool()
readAttributes
protected java.util.List readAttributes(java.io.DataInputStream dis)
throws java.io.IOException
- Reads attributes of the program element.
First 'short' read is expected to contain attribute count.
- Throws:
java.io.IOException
writeAttributes
protected void writeAttributes(java.io.DataOutputStream dos)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2001. Documenation generated August 26 2011.