equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2019, 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 |
245 int len = values.length(); |
245 int len = values.length(); |
246 if (len > 0) { |
246 if (len > 0) { |
247 buf.append('('); |
247 buf.append('('); |
248 boolean first = true; |
248 boolean first = true; |
249 for (Pair<MethodSymbol, Attribute> value : values) { |
249 for (Pair<MethodSymbol, Attribute> value : values) { |
250 if (!first) buf.append(", "); |
250 if (!first) |
|
251 buf.append(", "); |
251 first = false; |
252 first = false; |
252 |
253 |
253 Name name = value.fst.name; |
254 Name name = value.fst.name; |
254 if (len > 1 || name != name.table.names.value) { |
255 if (len > 1 || name != name.table.names.value) { |
255 buf.append(name); |
256 buf.append(name); |
366 this.value = Assert.checkNonNull(value); |
367 this.value = Assert.checkNonNull(value); |
367 } |
368 } |
368 public void accept(Visitor v) { v.visitEnum(this); } |
369 public void accept(Visitor v) { v.visitEnum(this); } |
369 @DefinedBy(Api.LANGUAGE_MODEL) |
370 @DefinedBy(Api.LANGUAGE_MODEL) |
370 public String toString() { |
371 public String toString() { |
371 return value.enclClass() + "." + value; // qualified name |
372 return value.toString(); |
372 } |
373 } |
373 @DefinedBy(Api.LANGUAGE_MODEL) |
374 @DefinedBy(Api.LANGUAGE_MODEL) |
374 public VarSymbol getValue() { |
375 public VarSymbol getValue() { |
375 return value; |
376 return value; |
376 } |
377 } |