ch.sahits.codegen.java.input
Class ClassFileParser

java.lang.Object
  extended by ch.sahits.codegen.java.input.ClassFileParser
All Implemented Interfaces:
IInputParser

public class ClassFileParser
extends java.lang.Object
implements IInputParser

This parser takes an input file and generates a ClassModel with it' members and methods

Since:
2.1.0
Author:
Andi Hotz, Sahits GmbH

Constructor Summary
ClassFileParser()
           
 
Method Summary
 java.lang.String getFileExtension()
          This parser can process class files
 int getRanking()
          Low ranking so that better implementation can override this basic implementation
 int getWorkload()
          Retrieve the workload
 void init(java.lang.String inputFile)
          Initialize the parser with a fully qualified Class name.
 EDBConnectionData needsDataBaseInformationForCompleetion()
          Indicate if the input file is self contained or if for compleetion of the model information from the second page is needed.
 IGeneratedObject parse()
          Parse the class into a ClassModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFileParser

public ClassFileParser()
Method Detail

getFileExtension

public java.lang.String getFileExtension()
This parser can process class files

Specified by:
getFileExtension in interface IInputParser
Returns:
class

getRanking

public int getRanking()
Low ranking so that better implementation can override this basic implementation

Specified by:
getRanking in interface IInputParser
Returns:
1

getWorkload

public int getWorkload()
Retrieve the workload

Specified by:
getWorkload in interface IInputParser
Returns:
10

init

public void init(java.lang.String inputFile)
          throws java.lang.Exception
Initialize the parser with a fully qualified Class name. The class must be within the classpath of the project

Specified by:
init in interface IInputParser
Parameters:
inputFile - fully qualified Classname
Throws:
java.lang.Exception

parse

public IGeneratedObject parse()
Parse the class into a ClassModel. As members only private members are considered. This because the class that is to be parsed is supposed to be a super class. All Methods are considered

Specified by:
parse in interface IInputParser
Returns:
Instance of ClassModel

needsDataBaseInformationForCompleetion

public EDBConnectionData needsDataBaseInformationForCompleetion()
Indicate if the input file is self contained or if for compleetion of the model information from the second page is needed.

Specified by:
needsDataBaseInformationForCompleetion in interface IInputParser
Returns: