Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.services.clientserver.java
Class BasicClassFileParser


java.lang.Object
  extended by 
org.eclipse.rse.services.clientserver.java.BasicClassFileParser

public class BasicClassFileParser
extends Object

This is a basic class file parser that returns a package name from a class file.


Constructor Summary
BasicClassFileParser ( InputStream stream)
          Constructor.
 
Method Summary
protected  org.eclipse.rse.internal.services.clientserver.java.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  org.eclipse.rse.internal.services.clientserver.java.AbstractAttributeInfo readAttribute (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Reads an attribute.
protected  org.eclipse.rse.internal.services.clientserver.java.AbstractCPInfo readConstantInfo (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Gets the constant info.
protected  void readConstantPool (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Reads the constant pool.
protected  org.eclipse.rse.internal.services.clientserver.java.FieldInfo readField (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Reads a field.
protected  void readFields (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Reads the fields.
protected  void readInterfaces (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Reads the interfaces.
protected  org.eclipse.rse.internal.services.clientserver.java.MethodInfo readMethod (org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
          Reads a method.
protected  void readMethods (org.eclipse.rse.internal.services.clientserver.java.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

BasicClassFileParser

public BasicClassFileParser(
InputStream stream)
Constructor.

Parameters:
stream - the input stream to parse.
Method Detail

getQualifiedClassName

public 
String getQualifiedClassName()
Returns the package.

Returns:
the package.

isExecutable

public boolean isExecutable()
Returns whether there is a public static void main(String[]) method.

Returns:
true if there is, otherwise false.

parse

public void parse()
           throws 
IOException
Parses a class file.

Throws:
IOException - if an I/O error occurs.

readConstantPool

protected void readConstantPool(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                         throws 
IOException
Reads the constant pool.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

readConstantInfo

protected org.eclipse.rse.internal.services.clientserver.java.AbstractCPInfo readConstantInfo(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                                                                                       throws 
IOException
Gets the constant info.

Parameters:
dataStream - the data stream.
Returns:
the constant info.
Throws:
IOException - if an I/O error occurs.

readInterfaces

protected void readInterfaces(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                       throws 
IOException
Reads the interfaces.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

readFields

protected void readFields(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                   throws 
IOException
Reads the fields.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

readField

protected org.eclipse.rse.internal.services.clientserver.java.FieldInfo readField(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                                                                           throws 
IOException
Reads a field.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

readMethods

protected void readMethods(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                    throws 
IOException
Reads the methods.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

readMethod

protected org.eclipse.rse.internal.services.clientserver.java.MethodInfo readMethod(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                                                                             throws 
IOException
Reads a method.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

readAttribute

protected org.eclipse.rse.internal.services.clientserver.java.AbstractAttributeInfo readAttribute(org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream dataStream)
                                                                                           throws 
IOException
Reads an attribute.

Parameters:
dataStream - the data stream.
Throws:
IOException - if an I/O error occurs.

getCPInfo

protected org.eclipse.rse.internal.services.clientserver.java.AbstractCPInfo getCPInfo(int index)
Returns the entry at the constant pool index.

Parameters:
index - the index.
Returns:
the constant pool table entry.

getString

protected 
String getString(int index)
Returns the name given an index to the constant pool table. The entry at the index must be a UTF8 string entry


RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire