Class SourceCode.Class
- java.lang.Object
-
- org.apache.openjpa.persistence.util.SourceCode.Element<SourceCode.Class>
-
- org.apache.openjpa.persistence.util.SourceCode.Class
-
- All Implemented Interfaces:
java.lang.Comparable<SourceCode.Element<SourceCode.Class>>
- Enclosing class:
- SourceCode
public class SourceCode.Class extends SourceCode.Element<SourceCode.Class>
Representclass
declaration.
-
-
Constructor Summary
Constructors Constructor Description Class(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceCode.Constructor
addConstructor()
SourceCode.Field
addField(java.lang.String name, java.lang.String type)
SourceCode.Field
addField(java.lang.String f, org.apache.openjpa.persistence.util.SourceCode.ClassName type)
SourceCode.Class
addInterface(java.lang.String s)
SourceCode.Method
addMethod(java.lang.String m, java.lang.String retType)
protected SourceCode.Method
addMethod(java.lang.String m, org.apache.openjpa.persistence.util.SourceCode.ClassName retType)
java.lang.String
getName()
java.lang.String
getPackageName()
SourceCode.Class
makeAbstract()
SourceCode.Class
makeFinal()
SourceCode.Class
markAsBean()
Adds getters and setters to every non-public field.SourceCode.Class
setSuper(java.lang.String s)
java.lang.String
toString()
void
write(java.io.PrintWriter out, int tab)
-
Methods inherited from class org.apache.openjpa.persistence.util.SourceCode.Element
addAnnotation, addComment, addParameter, compareTo, getType, makePrivate, makeProtected, makePublic, makeStatic
-
-
-
-
Method Detail
-
setSuper
public SourceCode.Class setSuper(java.lang.String s)
-
addInterface
public SourceCode.Class addInterface(java.lang.String s)
-
makeAbstract
public SourceCode.Class makeAbstract()
-
makeFinal
public SourceCode.Class makeFinal()
- Overrides:
makeFinal
in classSourceCode.Element<SourceCode.Class>
-
markAsBean
public SourceCode.Class markAsBean()
Adds getters and setters to every non-public field.
-
getName
public java.lang.String getName()
-
getPackageName
public java.lang.String getPackageName()
-
addField
public SourceCode.Field addField(java.lang.String name, java.lang.String type)
-
addField
public SourceCode.Field addField(java.lang.String f, org.apache.openjpa.persistence.util.SourceCode.ClassName type)
-
addMethod
public SourceCode.Method addMethod(java.lang.String m, java.lang.String retType)
-
addMethod
protected SourceCode.Method addMethod(java.lang.String m, org.apache.openjpa.persistence.util.SourceCode.ClassName retType)
-
addConstructor
public SourceCode.Constructor addConstructor()
-
write
public void write(java.io.PrintWriter out, int tab)
- Overrides:
write
in classSourceCode.Element<SourceCode.Class>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-