testsgen.wttools
Class ParsedSourceImpl

java.lang.Object
  |
  +--testsgen.wttools.ParsedSourceImpl
All Implemented Interfaces:
java.lang.Comparable, ParsedSourceIfc

public class ParsedSourceImpl
extends java.lang.Object
implements ParsedSourceIfc

ParsedSourceImpl.java contains implementation of ParsedSourceIfc interface. It contains methods for accessing all source elements.

This implementation (and interface) is class oriented. It means that whole idea and desing is for class processing. Additionally it assumes only one class in each file. This assumption is good for processing java sources but should be modified for processing other languages sources.

Created: Tue Dec 04 15:25:05 2001

Version:
$Revision: 1.10 $
Author:
Artur Hefczyc

Field Summary
protected  MethodIfc[] constrs
           
protected  MethodIfc def_constr
           
protected  java.lang.String file_name
           
protected  MethodIfc[] methods
           
protected  java.lang.String name
           
protected  ParsedSourceIfc test_src
           
 
Constructor Summary
ParsedSourceImpl()
           
ParsedSourceImpl(java.lang.String name, java.lang.reflect.Constructor def_con, java.lang.reflect.Constructor[] cons, java.lang.reflect.Method[] met, java.lang.String file)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 MethodIfc[] getConstructors()
           
 MethodIfc getDefaultConstructor()
           
 java.lang.String getFileName()
           
 MethodIfc getMethod(java.lang.String name)
           
 MethodIfc[] getMethods()
           
 java.lang.String getName()
           
 ParsedSourceIfc getTestSource()
           
protected  void setConstructors(java.lang.reflect.Constructor[] cons)
           
 void setConstructors(MethodIfc[] constrs)
           
 void setDefaultConstructor(MethodIfc constr)
           
 void setFileName(java.lang.String file)
           
protected  void setMethods(java.lang.reflect.Method[] met)
           
 void setMethods(MethodIfc[] methods)
           
 void setName(java.lang.String name)
           
 void setTestSource(ParsedSourceIfc test_src)
           
 java.lang.String toString()
           
 java.lang.String toXML()
           
 void toXML(java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file_name

protected java.lang.String file_name

name

protected java.lang.String name

def_constr

protected MethodIfc def_constr

constrs

protected MethodIfc[] constrs

methods

protected MethodIfc[] methods

test_src

protected ParsedSourceIfc test_src
Constructor Detail

ParsedSourceImpl

public ParsedSourceImpl()

ParsedSourceImpl

public ParsedSourceImpl(java.lang.String name,
                        java.lang.reflect.Constructor def_con,
                        java.lang.reflect.Constructor[] cons,
                        java.lang.reflect.Method[] met,
                        java.lang.String file)
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

setFileName

public void setFileName(java.lang.String file)
Specified by:
setFileName in interface ParsedSourceIfc

getFileName

public java.lang.String getFileName()
Specified by:
getFileName in interface ParsedSourceIfc

setConstructors

protected void setConstructors(java.lang.reflect.Constructor[] cons)

setMethods

protected void setMethods(java.lang.reflect.Method[] met)

setName

public void setName(java.lang.String name)
Specified by:
setName in interface ParsedSourceIfc

getName

public java.lang.String getName()
Specified by:
getName in interface ParsedSourceIfc

setDefaultConstructor

public void setDefaultConstructor(MethodIfc constr)
Specified by:
setDefaultConstructor in interface ParsedSourceIfc

getDefaultConstructor

public MethodIfc getDefaultConstructor()
Specified by:
getDefaultConstructor in interface ParsedSourceIfc

setConstructors

public void setConstructors(MethodIfc[] constrs)
Specified by:
setConstructors in interface ParsedSourceIfc

getConstructors

public MethodIfc[] getConstructors()
Specified by:
getConstructors in interface ParsedSourceIfc

setMethods

public void setMethods(MethodIfc[] methods)
Specified by:
setMethods in interface ParsedSourceIfc

getMethods

public MethodIfc[] getMethods()
Specified by:
getMethods in interface ParsedSourceIfc

getMethod

public MethodIfc getMethod(java.lang.String name)
Specified by:
getMethod in interface ParsedSourceIfc

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setTestSource

public void setTestSource(ParsedSourceIfc test_src)
Specified by:
setTestSource in interface ParsedSourceIfc

getTestSource

public ParsedSourceIfc getTestSource()
Specified by:
getTestSource in interface ParsedSourceIfc

toXML

public void toXML(java.io.OutputStream out)
Specified by:
toXML in interface ParsedSourceIfc

toXML

public java.lang.String toXML()
Specified by:
toXML in interface ParsedSourceIfc


Copyright © GNU, wttools developers Team.