com.objectwave.sourceGenerator
Class ReflectedClassSource

java.lang.Object
  |
  +--com.objectwave.sourceGenerator.ReflectedClassSource

public class ReflectedClassSource
extends java.lang.Object

Use reflection to create a 'source' file for the specified class.

Version:
$Id: ReflectedClassSource.java,v 2.1 2001/12/21 20:29:58 dave_hoag Exp $
Author:

Constructor Summary
ReflectedClassSource()
          Constructor for the ReflectedClassSource object
 
Method Summary
protected  void addClassDecl(java.lang.String className, java.lang.Class clazz, java.lang.StringBuffer buff)
          Adds a feature to the ClassDecl attribute of the ReflectedClassSource object
protected  void addFields(java.lang.Class clazz, java.lang.StringBuffer buff)
          Adds a feature to the Fields attribute of the ReflectedClassSource object
 void addMethodSource(java.lang.reflect.Method method, java.lang.Class clazz, java.lang.StringBuffer buff)
          Adds a feature to the BodySource attribute of the ReflectedClassSource object
protected  java.lang.String getJustClassName(java.lang.String className)
          Gets the JustClassName attribute of the ReflectedClassSource object
protected  java.lang.String getPackageDecl(java.lang.String className, java.lang.String targetPackageName)
          From the className and targetPackageName deterimine the package declartion for this generated class.
 java.lang.StringBuffer getSource(java.lang.Class clazz, java.lang.String overridePackageName)
          Gets the Source attribute of the ReflectedClassSource object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectedClassSource

public ReflectedClassSource()
Constructor for the ReflectedClassSource object

Method Detail

getSource

public java.lang.StringBuffer getSource(java.lang.Class clazz,
                                        java.lang.String overridePackageName)
                                 throws java.io.IOException
Gets the Source attribute of the ReflectedClassSource object

Parameters:
clazz -
overridePackageName -
Returns:
The Source value
Throws:
java.io.IOException

getJustClassName

protected java.lang.String getJustClassName(java.lang.String className)
Gets the JustClassName attribute of the ReflectedClassSource object

Parameters:
className -
Returns:
The JustClassName value

getPackageDecl

protected java.lang.String getPackageDecl(java.lang.String className,
                                          java.lang.String targetPackageName)
From the className and targetPackageName deterimine the package declartion for this generated class.

Parameters:
className -
targetPackageName -
Returns:
The PackageDecl value

addMethodSource

public void addMethodSource(java.lang.reflect.Method method,
                            java.lang.Class clazz,
                            java.lang.StringBuffer buff)
Adds a feature to the BodySource attribute of the ReflectedClassSource object

Parameters:
clazz - The feature to be added to the BodySource attribute
method - The feature to be added to the MethodSource attribute
buff - The feature to be added to the MethodSource attribute

addFields

protected void addFields(java.lang.Class clazz,
                         java.lang.StringBuffer buff)
Adds a feature to the Fields attribute of the ReflectedClassSource object

Parameters:
clazz - The feature to be added to the Fields attribute
buff - The feature to be added to the Fields attribute

addClassDecl

protected void addClassDecl(java.lang.String className,
                            java.lang.Class clazz,
                            java.lang.StringBuffer buff)
Adds a feature to the ClassDecl attribute of the ReflectedClassSource object

Parameters:
className - The feature to be added to the ClassDecl attribute
clazz - The feature to be added to the ClassDecl attribute
buff - The feature to be added to the ClassDecl attribute