|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.java.BasicClassFileParser
This is a basic class file parser that returns a package name from a class file.
Field Summary |
---|
Fields inherited from interface com.ibm.etools.systems.core.java.IClassFileConstants |
---|
CONSTANT_CLASS, CONSTANT_DOUBLE, CONSTANT_FIELD_REF, CONSTANT_FLOAT, CONSTANT_INTEGER, CONSTANT_INTERFACE_METHOD_REF, CONSTANT_LONG, CONSTANT_METHOD_REF, CONSTANT_NAME_AND_TYPE, CONSTANT_STRING, CONSTANT_UTF8 |
Constructor Summary | |
---|---|
BasicClassFileParser(InputStream stream)
Constuctor. |
Method Summary | |
---|---|
protected AbstractCPInfo |
getCPInfo(int index)
Returns the entry at the constant pool index. |
String |
getQualifiedClassName()
Returns the package. |
protected String |
getString(int index)
Returns the name given an index to the constant pool table. |
boolean |
isExecutable()
Returns whether there is a public static void main(String[]) method. |
void |
parse()
Parses a class file. |
protected AbstractAttributeInfo |
readAttribute(EnhancedDataInputStream dataStream)
Reads an attribute. |
protected AbstractCPInfo |
readConstantInfo(EnhancedDataInputStream dataStream)
Gets the constant info. |
protected void |
readConstantPool(EnhancedDataInputStream dataStream)
Reads the constant pool. |
protected FieldInfo |
readField(EnhancedDataInputStream dataStream)
Reads a field. |
protected void |
readFields(EnhancedDataInputStream dataStream)
Reads the fields. |
protected void |
readInterfaces(EnhancedDataInputStream dataStream)
Reads the interfaces. |
protected MethodInfo |
readMethod(EnhancedDataInputStream dataStream)
Reads a method. |
protected void |
readMethods(EnhancedDataInputStream dataStream)
Reads the methods. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicClassFileParser(InputStream stream)
Method Detail |
public String getQualifiedClassName()
public boolean isExecutable()
public static void main(String[])
method.
true
if there is, otherwise false
.public void parse() throws IOException
IOException
- if an I/O error occurs.protected void readConstantPool(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected AbstractCPInfo readConstantInfo(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected void readInterfaces(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected void readFields(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected FieldInfo readField(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected void readMethods(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected MethodInfo readMethod(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected AbstractAttributeInfo readAttribute(EnhancedDataInputStream dataStream) throws IOException
dataStream
- the data stream.
IOException
- if an I/O error occurs.protected AbstractCPInfo getCPInfo(int index)
index
- the index.
protected String getString(int index)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |