Class SourceCode.Element<T>
- java.lang.Object
-
- org.apache.openjpa.persistence.util.SourceCode.Element<T>
-
- All Implemented Interfaces:
Comparable<SourceCode.Element<T>>
- Direct Known Subclasses:
SourceCode.Class,SourceCode.Constructor,SourceCode.Field,SourceCode.Method
- Enclosing class:
- SourceCode
public abstract class SourceCode.Element<T> extends Object implements Comparable<SourceCode.Element<T>>
Abstract element has a name, optional list of modifiers, annotations and arguments.
-
-
Field Summary
Fields Modifier and Type Field Description protected SourceCode.ACCESSaccessprotected List<SourceCode.Annotation>annosprotected org.apache.openjpa.persistence.util.SourceCode.Commentcommentprotected booleanisFinalprotected booleanisStaticprotected Stringnameprotected List<org.apache.openjpa.persistence.util.SourceCode.ClassName>paramsprotected org.apache.openjpa.persistence.util.SourceCode.ClassNametype
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceCode.AnnotationaddAnnotation(String a)TaddComment(boolean inline, String... lines)SourceCode.Element<T>addParameter(String param)intcompareTo(SourceCode.Element<T> other)org.apache.openjpa.persistence.util.SourceCode.ClassNamegetType()TmakeFinal()TmakePrivate()TmakeProtected()TmakePublic()TmakeStatic()voidwrite(PrintWriter out, int tab)
-
-
-
Field Detail
-
name
protected 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 List<org.apache.openjpa.persistence.util.SourceCode.ClassName> params
-
annos
protected List<SourceCode.Annotation> annos
-
-
Constructor Detail
-
Element
protected Element(String name, org.apache.openjpa.persistence.util.SourceCode.ClassName type)
-
-
Method Detail
-
getType
public org.apache.openjpa.persistence.util.SourceCode.ClassName getType()
-
addAnnotation
public SourceCode.Annotation addAnnotation(String a)
-
addParameter
public SourceCode.Element<T> addParameter(String param)
-
compareTo
public int compareTo(SourceCode.Element<T> other)
- Specified by:
compareToin interfaceComparable<T>
-
makePublic
public T makePublic()
-
makeProtected
public T makeProtected()
-
makePrivate
public T makePrivate()
-
makeStatic
public T makeStatic()
-
makeFinal
public T makeFinal()
-
write
public void write(PrintWriter out, int tab)
-
-