org.apache.openjpa.persistence.util
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.Field
- 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.
Constructor Summary |
protected |
SourceCode.Element(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 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
SourceCode.Element
protected SourceCode.Element(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(String a)
addParameter
public SourceCode.Element<T> addParameter(String param)
compareTo
public int compareTo(SourceCode.Element<T> other)
- Specified by:
compareTo
in interface Comparable<SourceCode.Element<T>>
addComment
public T addComment(boolean inline,
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(PrintWriter out,
int tab)
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.