langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeDocImpl.java
changeset 1260 a772ba9ba43d
parent 10 06bc494ca11e
child 1264 076a3cde30d5
equal deleted inserted replaced
1259:61142e0aeb3f 1260:a772ba9ba43d
    25 
    25 
    26 package com.sun.tools.javadoc;
    26 package com.sun.tools.javadoc;
    27 
    27 
    28 import com.sun.javadoc.*;
    28 import com.sun.javadoc.*;
    29 
    29 
    30 import static com.sun.javadoc.LanguageVersion.*;
       
    31 
    30 
    32 import com.sun.tools.javac.code.Flags;
       
    33 import com.sun.tools.javac.code.Kinds;
    31 import com.sun.tools.javac.code.Kinds;
    34 import com.sun.tools.javac.code.Scope;
    32 import com.sun.tools.javac.code.Scope;
    35 import com.sun.tools.javac.code.Symbol;
       
    36 import com.sun.tools.javac.code.Symbol.*;
    33 import com.sun.tools.javac.code.Symbol.*;
    37 import com.sun.tools.javac.tree.JCTree.*;
    34 import com.sun.tools.javac.tree.JCTree.*;
    38 import com.sun.tools.javac.util.List;
    35 import com.sun.tools.javac.util.List;
    39 import com.sun.tools.javac.util.ListBuffer;
    36 import com.sun.tools.javac.util.Names;
    40 import com.sun.tools.javac.util.Name;
       
    41 import com.sun.tools.javac.util.Position;
    37 import com.sun.tools.javac.util.Position;
    42 
    38 
    43 /**
    39 /**
    44  * Represents an annotation type.
    40  * Represents an annotation type.
    45  *
    41  *
    91      * Returns the elements of this annotation type.
    87      * Returns the elements of this annotation type.
    92      * Returns an empty array if there are none.
    88      * Returns an empty array if there are none.
    93      * Elements are always public, so no need to filter them.
    89      * Elements are always public, so no need to filter them.
    94      */
    90      */
    95     public AnnotationTypeElementDoc[] elements() {
    91     public AnnotationTypeElementDoc[] elements() {
    96         Name.Table names = tsym.name.table;
    92         Names names = tsym.name.table.names;
    97         List<AnnotationTypeElementDoc> elements = List.nil();
    93         List<AnnotationTypeElementDoc> elements = List.nil();
    98         for (Scope.Entry e = tsym.members().elems; e != null; e = e.sibling) {
    94         for (Scope.Entry e = tsym.members().elems; e != null; e = e.sibling) {
    99             if (e.sym != null && e.sym.kind == Kinds.MTH) {
    95             if (e.sym != null && e.sym.kind == Kinds.MTH) {
   100                 MethodSymbol s = (MethodSymbol)e.sym;
    96                 MethodSymbol s = (MethodSymbol)e.sym;
   101                 elements = elements.prepend(env.getAnnotationTypeElementDoc(s));
    97                 elements = elements.prepend(env.getAnnotationTypeElementDoc(s));