コード例 #1
0
 /**
  * Returns the elements of this annotation type. Returns an empty array if there are none.
  * Elements are always public, so no need to filter them.
  */
 public AnnotationTypeElementDoc[] elements() {
   Name.Table names = tsym.name.table;
   List<AnnotationTypeElementDoc> elements = new List<AnnotationTypeElementDoc>();
   for (Scope.Entry e = tsym.members().elems; e != null; e = e.sibling) {
     if (e.sym != null && e.sym.kind == Kinds.MTH) {
       MethodSymbol s = (MethodSymbol) e.sym;
       elements = elements.prepend(env.getAnnotationTypeElementDoc(s));
     }
   }
   return elements.toArray(new AnnotationTypeElementDoc[elements.length()]);
 }