|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.codegen.server.JavaSourceWriterBuilder
public class JavaSourceWriterBuilder
A builder for JavaSourceWriter
instances.
Experimental API - subject to change.
Constructor Summary | |
---|---|
JavaSourceWriterBuilder(AbortablePrintWriter printWriter,
java.lang.String packageName,
java.lang.String className)
|
Method Summary | |
---|---|
void |
addAnnotationDeclaration(java.lang.String declaration)
Add an class/interface annotation. |
void |
addImplementedInterface(java.lang.String intfName)
Add an implemented/extended interface. |
void |
addImport(java.lang.String typeName)
Add an import entry. |
SourceWriter |
createSourceWriter()
Creates an implementation of JavaSourceWriter that can be used to write
the innards of a class. |
java.lang.Iterable<java.lang.String> |
getAnnotationDeclarations()
Get the annotations. |
java.lang.String |
getClassName()
Get the simple name of the class being created. |
java.lang.String |
getFullyQualifiedClassName()
Get the fully-qualified source name of the class being created. |
java.lang.Iterable<java.lang.String> |
getInterfaceNames()
Get the implemented/extended interfaces for the class being created. |
java.lang.String |
getPackageName()
Get the package of the class being created. |
java.lang.String |
getSuperclassName()
Get the superclass for the class being created. |
void |
makeInterface()
We are creating an interface instead of a class. |
void |
setJavaDocCommentForClass(java.lang.String comment)
Sets the java doc comment for this . |
void |
setSuperclass(java.lang.String superclassName)
Set the superclass of the class being created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaSourceWriterBuilder(AbortablePrintWriter printWriter, java.lang.String packageName, java.lang.String className)
printWriter
- packageName
- className
- Method Detail |
---|
public void addAnnotationDeclaration(java.lang.String declaration)
declaration
- public void addImplementedInterface(java.lang.String intfName)
intfName
- public void addImport(java.lang.String typeName)
typeName
- fully-qualified source namepublic SourceWriter createSourceWriter()
JavaSourceWriter
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.
JavaSourceWriter
instance
java.lang.RuntimeException
- If the settings on this factory are inconsistent
or invalidpublic java.lang.Iterable<java.lang.String> getAnnotationDeclarations()
public java.lang.String getClassName()
public java.lang.String getFullyQualifiedClassName()
public java.lang.Iterable<java.lang.String> getInterfaceNames()
public java.lang.String getPackageName()
public java.lang.String getSuperclassName()
public void makeInterface()
public void setJavaDocCommentForClass(java.lang.String comment)
this
.
comment
- java doc comment.public void setSuperclass(java.lang.String superclassName)
superclassName
-
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |