src/share/classes/com/sun/tools/javadoc/ExecutableMemberDocImpl.java

changeset 1521
71f35e4b93a5
parent 1443
cfde9737131e
child 1644
40adaf938847
equal deleted inserted replaced
1520:5c956be64b9e 1521:71f35e4b93a5
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
26 package com.sun.tools.javadoc; 26 package com.sun.tools.javadoc;
27 27
28 import java.lang.reflect.Modifier; 28 import java.lang.reflect.Modifier;
29 import java.text.CollationKey; 29 import java.text.CollationKey;
30 30
31 import javax.lang.model.type.TypeKind;
32
31 import com.sun.javadoc.*; 33 import com.sun.javadoc.*;
32 34
33 import com.sun.source.util.TreePath; 35 import com.sun.source.util.TreePath;
36 import com.sun.tools.javac.code.Attribute;
34 import com.sun.tools.javac.code.Flags; 37 import com.sun.tools.javac.code.Flags;
38 import com.sun.tools.javac.code.Attribute.Compound;
35 import com.sun.tools.javac.code.Symbol.*; 39 import com.sun.tools.javac.code.Symbol.*;
36 import com.sun.tools.javac.code.Type; 40 import com.sun.tools.javac.code.Type;
37 import com.sun.tools.javac.util.List; 41 import com.sun.tools.javac.util.List;
38 import com.sun.tools.javac.util.ListBuffer; 42 import com.sun.tools.javac.util.ListBuffer;
39 43
189 Parameter result[] = new Parameter[params.length()]; 193 Parameter result[] = new Parameter[params.length()];
190 194
191 int i = 0; 195 int i = 0;
192 for (VarSymbol param : params) { 196 for (VarSymbol param : params) {
193 result[i++] = new ParameterImpl(env, param); 197 result[i++] = new ParameterImpl(env, param);
198 }
199 return result;
200 }
201
202 public AnnotationDesc[] receiverAnnotations() {
203 // TODO: change how receiver annotations are output!
204 Type recvtype = sym.type.asMethodType().recvtype;
205 if (recvtype == null) {
206 return new AnnotationDesc[0];
207 }
208 if (recvtype.getKind() != TypeKind.ANNOTATED) {
209 return new AnnotationDesc[0];
210 }
211 List<? extends Compound> typeAnnos = ((com.sun.tools.javac.code.Type.AnnotatedType)recvtype).typeAnnotations;
212 AnnotationDesc result[] = new AnnotationDesc[typeAnnos.length()];
213 int i = 0;
214 for (Attribute.Compound a : typeAnnos) {
215 result[i++] = new AnnotationDescImpl(env, a);
194 } 216 }
195 return result; 217 return result;
196 } 218 }
197 219
198 /** 220 /**

mercurial