org.apache.openjpa.persistence.util
Class SourceCode.Class

java.lang.Object
  extended by org.apache.openjpa.persistence.util.SourceCode.Element<SourceCode.Class>
      extended by org.apache.openjpa.persistence.util.SourceCode.Class
All Implemented Interfaces:
Comparable<SourceCode.Element<SourceCode.Class>>
Enclosing class:
SourceCode

public class SourceCode.Class
extends SourceCode.Element<SourceCode.Class>

Represent class declaration.


Field Summary
 
Fields inherited from class org.apache.openjpa.persistence.util.SourceCode.Element
access, annos, comment, isFinal, isStatic, name, params, type
 
Constructor Summary
SourceCode.Class(String name)
           
 
Method Summary
 SourceCode.Constructor addConstructor()
           
 SourceCode.Field addField(String f, org.apache.openjpa.persistence.util.SourceCode.ClassName type)
           
 SourceCode.Field addField(String name, String type)
           
 SourceCode.Class addInterface(String s)
           
protected  SourceCode.Method addMethod(String m, org.apache.openjpa.persistence.util.SourceCode.ClassName retType)
           
 SourceCode.Method addMethod(String m, String retType)
           
 String getName()
           
 String getPackageName()
           
 SourceCode.Class makeAbstract()
           
 SourceCode.Class markAsBean()
          Adds getters and setters to every non-public field.
 SourceCode.Class setSuper(String s)
           
 String toString()
           
 void write(PrintWriter out, int tab)
           
 
Methods inherited from class org.apache.openjpa.persistence.util.SourceCode.Element
addAnnotation, addComment, addParameter, compareTo, getType, makeFinal, makePrivate, makeProtected, makePublic, makeStatic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SourceCode.Class

public SourceCode.Class(String name)
Method Detail

setSuper

public SourceCode.Class setSuper(String s)

addInterface

public SourceCode.Class addInterface(String s)

makeAbstract

public SourceCode.Class makeAbstract()

markAsBean

public SourceCode.Class markAsBean()
Adds getters and setters to every non-public field.


getName

public String getName()

getPackageName

public String getPackageName()

addField

public SourceCode.Field addField(String name,
                                 String type)

addField

public SourceCode.Field addField(String f,
                                 org.apache.openjpa.persistence.util.SourceCode.ClassName type)

addMethod

public SourceCode.Method addMethod(String m,
                                   String retType)

addMethod

protected SourceCode.Method addMethod(String m,
                                      org.apache.openjpa.persistence.util.SourceCode.ClassName retType)

addConstructor

public SourceCode.Constructor addConstructor()

write

public void write(PrintWriter out,
                  int tab)
Overrides:
write in class SourceCode.Element<SourceCode.Class>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.