com.google.gwt.user.rebind
Class ClassSourceFileComposerFactory

java.lang.Object
  extended by com.google.gwt.user.rebind.ClassSourceFileComposerFactory

public class ClassSourceFileComposerFactory
extends java.lang.Object

Factory clas to create ClassSourceFileComposer instances.


Nested Class Summary
static class ClassSourceFileComposerFactory.JavaSourceCategory
          Represents a java source file category.
 
Constructor Summary
ClassSourceFileComposerFactory(java.lang.String packageName, java.lang.String className)
           
 
Method Summary
 void addAnnotationDeclaration(java.lang.String declaration)
           
 void addImplementedInterface(java.lang.String intfName)
           
 void addImport(java.lang.String typeName)
           
 SourceWriter createSourceWriter(GeneratorContext ctx, java.io.PrintWriter printWriter)
          Creates an implementation of SourceWriter that can be used to write the innards of a class.
 SourceWriter createSourceWriter(java.io.PrintWriter printWriter)
          Creates an implementation of SourceWriter that can be used to write the innards of a class.
 java.lang.String[] getAnnotationDeclarations()
           
 java.lang.String getCreatedClassName()
           
 java.lang.String getCreatedClassShortName()
           
 java.lang.String getCreatedPackage()
           
 java.lang.String[] getInterfaceNames()
           
 java.lang.String getSuperclassName()
           
 void makeInterface()
          This class is an interface.
 void setJavaDocCommentForClass(java.lang.String comment)
          Sets the java doc comment for this.
 void setSuperclass(java.lang.String superclassName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassSourceFileComposerFactory

public ClassSourceFileComposerFactory(java.lang.String packageName,
                                      java.lang.String className)
Method Detail

addAnnotationDeclaration

public void addAnnotationDeclaration(java.lang.String declaration)

addImplementedInterface

public void addImplementedInterface(java.lang.String intfName)

addImport

public void addImport(java.lang.String typeName)

createSourceWriter

public SourceWriter createSourceWriter(GeneratorContext ctx,
                                       java.io.PrintWriter printWriter)
Creates an implementation of SourceWriter that can be used to write the innards of a class. Note that the subsequent changes to this factory do not affect the returned instance.

Throws:
java.lang.RuntimeException - If the settings on this factory are inconsistent or invalid

createSourceWriter

public SourceWriter createSourceWriter(java.io.PrintWriter printWriter)
Creates an implementation of SourceWriter that can be used to write the innards of a class. Note that the subsequent changes to this factory do not affect the returned instance.

Parameters:
printWriter - underlying writer
Returns:
the source writer
Throws:
java.lang.RuntimeException - If the settings on this factory are inconsistent or invalid

getAnnotationDeclarations

public java.lang.String[] getAnnotationDeclarations()

getCreatedClassName

public java.lang.String getCreatedClassName()

getCreatedClassShortName

public java.lang.String getCreatedClassShortName()

getCreatedPackage

public java.lang.String getCreatedPackage()

getInterfaceNames

public java.lang.String[] getInterfaceNames()

getSuperclassName

public java.lang.String getSuperclassName()

makeInterface

public void makeInterface()
This class is an interface.


setJavaDocCommentForClass

public void setJavaDocCommentForClass(java.lang.String comment)
Sets the java doc comment for this.

Parameters:
comment - java doc comment.

setSuperclass

public void setSuperclass(java.lang.String superclassName)