diff options
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java index f58de40a1..1472b3cc7 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved. + * Copyright (c) 2016 GoPivotal, Inc. All Rights Reserved. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -123,40 +123,9 @@ protected void reset() { } public String toString() { - StringBuffer buffer = new StringBuffer(); - buffer.append(this.annotation); - buffer.append(' '); - // Not fully decoding it here, just including all the information in the string - buffer.append("target_type=").append(this.targetType); //$NON-NLS-1$ - buffer.append(", info=").append(this.info); //$NON-NLS-1$ - buffer.append(", info2=").append(this.info2); //$NON-NLS-1$ - if (this.typePath != NO_TYPE_PATH) { - buffer.append(", location=["); //$NON-NLS-1$ - for (int i = 0, max = this.typePath.length; i < max; i += 2) { - if (i > 0) { - buffer.append(", "); //$NON-NLS-1$ - } - switch (this.typePath[i]) { - case 0: - buffer.append("ARRAY"); //$NON-NLS-1$ - break; - case 1: - buffer.append("INNER_TYPE"); //$NON-NLS-1$ - break; - case 2: - buffer.append("WILDCARD"); //$NON-NLS-1$ - break; - case 3: - buffer.append("TYPE_ARGUMENT(").append(this.typePath[i+1]).append(')'); //$NON-NLS-1$ - break; - } - } - buffer.append(']'); - } - return buffer.toString(); + return BinaryTypeFormatter.annotationToString(this); } - public int getTargetType() { return this.targetType; } |