org.apache.openjpa.persistence.util
Class SourceCode.Element<T>
java.lang.Object
org.apache.openjpa.persistence.util.SourceCode.Element<T>
- All Implemented Interfaces:
- java.lang.Comparable<SourceCode.Element<T>>
- Direct Known Subclasses:
- SourceCode.Class, SourceCode.Field
- Enclosing class:
- SourceCode
public abstract class SourceCode.Element<T>
- extends java.lang.Object
- implements java.lang.Comparable<SourceCode.Element<T>>
Abstract element has a name, optional list of modifiers, annotations
and arguments.
Constructor Summary |
protected |
SourceCode.Element(java.lang.String name,
org.apache.openjpa.persistence.util.SourceCode.ClassName type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
type
protected org.apache.openjpa.persistence.util.SourceCode.ClassName type
access
protected SourceCode.ACCESS access
isStatic
protected boolean isStatic
isFinal
protected boolean isFinal
comment
protected org.apache.openjpa.persistence.util.SourceCode.Comment comment
params
protected java.util.List<org.apache.openjpa.persistence.util.SourceCode.ClassName> params
annos
protected java.util.List<SourceCode.Annotation> annos
SourceCode.Element
protected SourceCode.Element(java.lang.String name,
org.apache.openjpa.persistence.util.SourceCode.ClassName type)
getType
public org.apache.openjpa.persistence.util.SourceCode.ClassName getType()
addAnnotation
public SourceCode.Annotation addAnnotation(java.lang.String a)
addParameter
public SourceCode.Element<T> addParameter(java.lang.String param)
compareTo
public int compareTo(SourceCode.Element<T> other)
- Specified by:
compareTo
in interface java.lang.Comparable<SourceCode.Element<T>>
addComment
public T addComment(boolean inline,
java.lang.String... lines)
makePublic
public T makePublic()
makeProtected
public T makeProtected()
makePrivate
public T makePrivate()
makeStatic
public T makeStatic()
makeFinal
public T makeFinal()
write
public void write(java.io.PrintWriter out,
int tab)