testsgen.wttools
Class SrcParserImpl

java.lang.Object
  |
  +--testsgen.wttools.SrcParserImpl
All Implemented Interfaces:
SrcParserIfc

public class SrcParserImpl
extends java.lang.Object
implements SrcParserIfc

SrcParserImpl.java contains implementation of SrcParserIfc interface. At the moment this is very simple parser.

It is based on java.reflection info and doesn't try to do real parsing. I am going to use BCEL from jakarta project in short future. I hope it will help me access to more info which can be useful for test generating or create some code hints for developers.

Created: Mon Dec 3 23:39:26 2001

Version:
$Revision: 1.19 $
Author:
Artur Hefczyc

Field Summary
protected  java.lang.String dest_dir
           
protected  boolean force
           
protected  java.lang.Class junit_tc
           
protected  LogIfc log
           
protected  java.lang.String name_pattern
           
protected  PropertyIfc property
           
protected  boolean recursive
           
protected  boolean test_only
           
 
Constructor Summary
SrcParserImpl()
           
 
Method Summary
protected  java.lang.String getClassFullName(java.lang.String file_name)
           
protected  java.lang.reflect.Constructor getDefaultConstructor(java.lang.reflect.Constructor[] all_constr)
           
protected  java.lang.reflect.Method[] getNonPrivateMethods(java.lang.reflect.Method[] all_methods, java.lang.Class cl)
           
 ParsedSourceIfc[] getParsedSources(java.lang.String[] file_names)
           
protected  ParsedSourceIfc getSourceClass(java.lang.Class cls, java.lang.String cls_name, java.lang.String file_name)
           
protected  ParsedSourceIfc getTestSource(ParsedSourceIfc src)
           
protected  void setJobParameters()
           
 void setLogHandler(LogIfc log_handler)
           
 void setPropertyHandler(PropertyIfc property_handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected LogIfc log

property

protected PropertyIfc property

test_only

protected boolean test_only

recursive

protected boolean recursive

force

protected boolean force

name_pattern

protected java.lang.String name_pattern

dest_dir

protected java.lang.String dest_dir

junit_tc

protected java.lang.Class junit_tc
Constructor Detail

SrcParserImpl

public SrcParserImpl()
Method Detail

setLogHandler

public void setLogHandler(LogIfc log_handler)
Specified by:
setLogHandler in interface SrcParserIfc
Parameters:
log_handler -

setPropertyHandler

public void setPropertyHandler(PropertyIfc property_handler)
Specified by:
setPropertyHandler in interface SrcParserIfc
Parameters:
property_handler -

getClassFullName

protected java.lang.String getClassFullName(java.lang.String file_name)

getDefaultConstructor

protected java.lang.reflect.Constructor getDefaultConstructor(java.lang.reflect.Constructor[] all_constr)

getNonPrivateMethods

protected java.lang.reflect.Method[] getNonPrivateMethods(java.lang.reflect.Method[] all_methods,
                                                          java.lang.Class cl)

getTestSource

protected ParsedSourceIfc getTestSource(ParsedSourceIfc src)

getSourceClass

protected ParsedSourceIfc getSourceClass(java.lang.Class cls,
                                         java.lang.String cls_name,
                                         java.lang.String file_name)

getParsedSources

public ParsedSourceIfc[] getParsedSources(java.lang.String[] file_names)
Specified by:
getParsedSources in interface SrcParserIfc
Parameters:
file_names -
Returns:

setJobParameters

protected void setJobParameters()


Copyright © GNU, wttools developers Team.