org.apache.openjpa.persistence.util
public class SourceCode extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SourceCode.ACCESS |
class |
SourceCode.Annotation
Represents annotation.
|
class |
SourceCode.Argument<K,V>
Represents method argument.
|
class |
SourceCode.Class
Represent
class declaration. |
class |
SourceCode.Element<T>
Abstract element has a name, optional list of modifiers, annotations
and arguments.
|
class |
SourceCode.Field
Represents field declaration.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMA |
static java.lang.String |
DOT |
static java.lang.String |
EQUAL |
static java.lang.String |
QUOTE |
Constructor and Description |
---|
SourceCode(java.lang.String c)
Create source code for a top-level class with given fully-qualified
class name.
|
Modifier and Type | Method and Description |
---|---|
SourceCode |
addComment(boolean inline,
java.lang.String... lines) |
org.apache.openjpa.persistence.util.SourceCode.Package |
getPackage() |
SourceCode.Class |
getTopLevelClass()
Gets the top level class represented by this receiver.
|
static boolean |
isJavaIdentifier(java.lang.String s) |
static boolean |
isKnownType(java.lang.String s) |
SourceCode |
setTabSize(int t)
Sets the tab size.
|
static java.lang.String[] |
wrap(java.lang.String longLine,
int width)
Wraps the given string into lines of max length width at word boundaries
|
void |
write(java.io.PrintWriter out)
Prints the class to the given Writer.
|
public static final java.lang.String COMMA
public static final java.lang.String DOT
public static final java.lang.String EQUAL
public static final java.lang.String QUOTE
public SourceCode(java.lang.String c)
public SourceCode.Class getTopLevelClass()
public org.apache.openjpa.persistence.util.SourceCode.Package getPackage()
public SourceCode setTabSize(int t)
public SourceCode addComment(boolean inline, java.lang.String... lines)
public void write(java.io.PrintWriter out)
out
- public static java.lang.String[] wrap(java.lang.String longLine, int width)
public static boolean isKnownType(java.lang.String s)
public static boolean isJavaIdentifier(java.lang.String s)