equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2012, 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 |
285 constString = ((d < 0) ? "-" : "") + "InfD"; |
285 constString = ((d < 0) ? "-" : "") + "InfD"; |
286 else |
286 else |
287 constString = value.toString(); |
287 constString = value.toString(); |
288 } |
288 } |
289 if (constString != null) { |
289 if (constString != null) { |
290 StringBuffer s = new StringBuffer("#undef "); |
290 StringBuilder s = new StringBuilder("#undef "); |
291 s.append(cname); s.append("_"); s.append(fname); s.append(lineSep); |
291 s.append(cname); s.append("_"); s.append(fname); s.append(lineSep); |
292 s.append("#define "); s.append(cname); s.append("_"); |
292 s.append("#define "); s.append(cname); s.append("_"); |
293 s.append(fname); s.append(" "); s.append(constString); |
293 s.append(fname); s.append(" "); s.append(constString); |
294 return s.toString(); |
294 return s.toString(); |
295 } |
295 } |
368 return fields; |
368 return fields; |
369 } |
369 } |
370 |
370 |
371 // c.f. MethodDoc.signature |
371 // c.f. MethodDoc.signature |
372 String signature(ExecutableElement e) { |
372 String signature(ExecutableElement e) { |
373 StringBuffer sb = new StringBuffer("("); |
373 StringBuilder sb = new StringBuilder("("); |
374 String sep = ""; |
374 String sep = ""; |
375 for (VariableElement p: e.getParameters()) { |
375 for (VariableElement p: e.getParameters()) { |
376 sb.append(sep); |
376 sb.append(sep); |
377 sb.append(types.erasure(p.asType()).toString()); |
377 sb.append(types.erasure(p.asType()).toString()); |
378 sep = ","; |
378 sep = ","; |