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 Details

    • 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 Details

    • Element

      protected Element(String name, org.apache.openjpa.persistence.util.SourceCode.ClassName type)
  • Method Details

    • 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<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)