diff -r c4292590fc70 -r e5d3cd43c85e src/share/classes/com/sun/tools/javac/code/Symbol.java --- a/src/share/classes/com/sun/tools/javac/code/Symbol.java Sat Oct 19 17:43:09 2013 +0100 +++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java Sun Oct 20 12:01:43 2013 -0700 @@ -100,7 +100,7 @@ /** The attributes of this symbol are contained in this * SymbolMetadata. The SymbolMetadata instance is NOT immutable. */ - protected SymbolMetadata annotations; + protected SymbolMetadata metadata; /** An accessor method for the attributes of this symbol. @@ -108,9 +108,9 @@ * method to make sure that the class symbol is loaded. */ public List getRawAttributes() { - return (annotations == null) + return (metadata == null) ? List.nil() - : annotations.getDeclarationAttributes(); + : metadata.getDeclarationAttributes(); } /** An accessor method for the type attributes of this symbol. @@ -118,9 +118,9 @@ * method to make sure that the class symbol is loaded. */ public List getRawTypeAttributes() { - return (annotations == null) + return (metadata == null) ? List.nil() - : annotations.getTypeAttributes(); + : metadata.getTypeAttributes(); } /** Fetch a particular annotation from a symbol. */ @@ -132,106 +132,106 @@ } public boolean annotationsPendingCompletion() { - return annotations == null ? false : annotations.pendingCompletion(); + return metadata == null ? false : metadata.pendingCompletion(); } public void appendAttributes(List l) { if (l.nonEmpty()) { - initedAnnos().append(l); + initedMetadata().append(l); } } public void appendClassInitTypeAttributes(List l) { if (l.nonEmpty()) { - initedAnnos().appendClassInitTypeAttributes(l); + initedMetadata().appendClassInitTypeAttributes(l); } } public void appendInitTypeAttributes(List l) { if (l.nonEmpty()) { - initedAnnos().appendInitTypeAttributes(l); + initedMetadata().appendInitTypeAttributes(l); } } public void appendTypeAttributesWithCompletion(final Annotate.AnnotateRepeatedContext ctx) { - initedAnnos().appendTypeAttributesWithCompletion(ctx); + initedMetadata().appendTypeAttributesWithCompletion(ctx); } public void appendUniqueTypeAttributes(List l) { if (l.nonEmpty()) { - initedAnnos().appendUniqueTypes(l); + initedMetadata().appendUniqueTypes(l); } } public List getClassInitTypeAttributes() { - return (annotations == null) + return (metadata == null) ? List.nil() - : annotations.getClassInitTypeAttributes(); + : metadata.getClassInitTypeAttributes(); } public List getInitTypeAttributes() { - return (annotations == null) + return (metadata == null) ? List.nil() - : annotations.getInitTypeAttributes(); + : metadata.getInitTypeAttributes(); } public List getDeclarationAttributes() { - return (annotations == null) + return (metadata == null) ? List.nil() - : annotations.getDeclarationAttributes(); + : metadata.getDeclarationAttributes(); } public boolean hasAnnotations() { - return (annotations != null && !annotations.isEmpty()); + return (metadata != null && !metadata.isEmpty()); } public boolean hasTypeAnnotations() { - return (annotations != null && !annotations.isTypesEmpty()); + return (metadata != null && !metadata.isTypesEmpty()); } public void prependAttributes(List l) { if (l.nonEmpty()) { - initedAnnos().prepend(l); + initedMetadata().prepend(l); } } public void resetAnnotations() { - initedAnnos().reset(); + initedMetadata().reset(); } public void setAttributes(Symbol other) { - if (annotations != null || other.annotations != null) { - initedAnnos().setAttributes(other.annotations); + if (metadata != null || other.metadata != null) { + initedMetadata().setAttributes(other.metadata); } } public void setDeclarationAttributes(List a) { - if (annotations != null || a.nonEmpty()) { - initedAnnos().setDeclarationAttributes(a); + if (metadata != null || a.nonEmpty()) { + initedMetadata().setDeclarationAttributes(a); } } public void setDeclarationAttributesWithCompletion(final Annotate.AnnotateRepeatedContext ctx) { - initedAnnos().setDeclarationAttributesWithCompletion(ctx); + initedMetadata().setDeclarationAttributesWithCompletion(ctx); } public void setTypeAttributes(List a) { - if (annotations != null || a.nonEmpty()) { - if (annotations == null) - annotations = new SymbolMetadata(this); - annotations.setTypeAttributes(a); + if (metadata != null || a.nonEmpty()) { + if (metadata == null) + metadata = new SymbolMetadata(this); + metadata.setTypeAttributes(a); } } - private SymbolMetadata initedAnnos() { - if (annotations == null) - annotations = new SymbolMetadata(this); - return annotations; + private SymbolMetadata initedMetadata() { + if (metadata == null) + metadata = new SymbolMetadata(this); + return metadata; } /** This method is intended for debugging only. */ - public SymbolMetadata getAnnotations() { - return annotations; + public SymbolMetadata getMetadata() { + return metadata; } // @@ -862,10 +862,10 @@ } private void mergeAttributes() { - if (annotations == null && - package_info.annotations != null) { - annotations = new SymbolMetadata(this); - annotations.setAttributes(package_info.annotations); + if (metadata == null && + package_info.metadata != null) { + metadata = new SymbolMetadata(this); + metadata.setAttributes(package_info.metadata); } }