Java Code Examples for org.eclipse.jdt.core.compiler.CharOperation#replaceOnCopy()

The following examples show how to use org.eclipse.jdt.core.compiler.CharOperation#replaceOnCopy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Engine.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public static char[] getSignature(MethodBinding methodBinding) {
	char[] result = null;

	int oldMod = methodBinding.modifiers;
	//TODO remove the next line when method from binary type will be able to generate generic signature
	methodBinding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
	result = methodBinding.genericSignature();
	if(result == null) {
		result = methodBinding.signature();
	}
	methodBinding.modifiers = oldMod;

	if (result != null) {
		result = CharOperation.replaceOnCopy(result, '/', '.');
	}
	return result;
}
 
Example 2
Source File: BinaryIndexer.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public void addTypeReference(char[] typeName) {
	int length = typeName.length;
	if (length > 2 && typeName[length - 2] == '$') {
		switch (typeName[length - 1]) {
			case '0' :
			case '1' :
			case '2' :
			case '3' :
			case '4' :
			case '5' :
			case '6' :
			case '7' :
			case '8' :
			case '9' :
				return; // skip local type names
		}
	}

 	// consider that A$B is a member type: so replace '$' with '.'
 	// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=40116)
	typeName = CharOperation.replaceOnCopy(typeName, '$', '.'); // copy it so the original is not modified

	super.addTypeReference(typeName);
}
 
Example 3
Source File: Disassembler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
private void disassembleAsModifier(IAnnotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
	final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
	buffer.append('@').append(returnClassName(Signature.toCharArray(typeName), '.', mode));
	final IAnnotationComponent[] components = annotation.getComponents();
	final int length = components.length;
	if (length != 0) {
		buffer.append('(');
		for (int i = 0; i < length; i++) {
			if (i > 0) {
				buffer.append(',');
				writeNewLine(buffer, lineSeparator, tabNumber);
			}
			disassembleAsModifier(components[i], buffer, lineSeparator, tabNumber + 1, mode);
		}
		buffer.append(')');
	}
}
 
Example 4
Source File: Disassembler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
private void disassemble(IAnnotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
	writeNewLine(buffer, lineSeparator, tabNumber + 1);
	final int typeIndex = annotation.getTypeIndex();
	final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
	buffer.append(
		Messages.bind(Messages.disassembler_annotationentrystart, new String[] {
			Integer.toString(typeIndex),
			new String(returnClassName(Signature.toCharArray(typeName), '.', mode))
		}));
	final IAnnotationComponent[] components = annotation.getComponents();
	for (int i = 0, max = components.length; i < max; i++) {
		disassemble(components[i], buffer, lineSeparator, tabNumber + 1, mode);
	}
	writeNewLine(buffer, lineSeparator, tabNumber + 1);
	buffer.append(Messages.disassembler_annotationentryend);
}
 
Example 5
Source File: Util.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
private static ICompilationUnit getCompilationUnit(char[] fileName, WorkingCopyOwner workingCopyOwner) {
	char[] slashSeparatedFileName = CharOperation.replaceOnCopy(fileName, File.separatorChar, '/');
	int pkgEnd = CharOperation.lastIndexOf('/', slashSeparatedFileName); // pkgEnd is exclusive
	if (pkgEnd == -1)
		return null;
	IPackageFragment pkg = getPackageFragment(slashSeparatedFileName, pkgEnd, -1/*no jar separator for .java files*/);
	if (pkg == null) return null;
	int start;
	ICompilationUnit cu = pkg.getCompilationUnit(new String(slashSeparatedFileName, start =  pkgEnd+1, slashSeparatedFileName.length - start));
	if (workingCopyOwner != null) {
		ICompilationUnit workingCopy = cu.findWorkingCopy(workingCopyOwner);
		if (workingCopy != null)
			return workingCopy;
	}
	return cu;
}
 
Example 6
Source File: Engine.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public static char[] getTypeSignature(TypeBinding typeBinding) {
	char[] result = typeBinding.signature();
	if (result != null) {
		result = CharOperation.replaceOnCopy(result, '/', '.');
	}
	return result;
}
 
Example 7
Source File: BinaryMethod.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public String[] getExceptionTypes() throws JavaModelException {
	if (this.exceptionTypes == null) {
		IBinaryMethod info = (IBinaryMethod) getElementInfo();
		char[] genericSignature = info.getGenericSignature();
		if (genericSignature != null) {
			char[] dotBasedSignature = CharOperation.replaceOnCopy(genericSignature, '/', '.');
			this.exceptionTypes = Signature.getThrownExceptionTypes(new String(dotBasedSignature));
		}
		if (this.exceptionTypes == null || this.exceptionTypes.length == 0) {
			char[][] eTypeNames = info.getExceptionTypeNames();
			if (eTypeNames == null || eTypeNames.length == 0) {
				this.exceptionTypes = CharOperation.NO_STRINGS;
			} else {
				eTypeNames = ClassFile.translatedNames(eTypeNames);
				this.exceptionTypes = new String[eTypeNames.length];
				for (int j = 0, length = eTypeNames.length; j < length; j++) {
					// 1G01HRY: ITPJCORE:WINNT - method.getExceptionType not in correct format
					int nameLength = eTypeNames[j].length;
					char[] convertedName = new char[nameLength + 2];
					System.arraycopy(eTypeNames[j], 0, convertedName, 1, nameLength);
					convertedName[0] = 'L';
					convertedName[nameLength + 1] = ';';
					this.exceptionTypes[j] = new String(convertedName);
				}
			}
		}
	}
	return this.exceptionTypes;
}
 
Example 8
Source File: BinaryMethod.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @see IMethod#getTypeParameterSignatures()
 * @since 3.0
 * @deprecated
 */
public String[] getTypeParameterSignatures() throws JavaModelException {
	IBinaryMethod info = (IBinaryMethod) getElementInfo();
	char[] genericSignature = info.getGenericSignature();
	if (genericSignature == null)
		return CharOperation.NO_STRINGS;
	char[] dotBasedSignature = CharOperation.replaceOnCopy(genericSignature, '/', '.');
	char[][] typeParams = Signature.getTypeParameters(dotBasedSignature);
	return CharOperation.toStrings(typeParams);
}
 
Example 9
Source File: Disassembler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void disassemble(IExtendedAnnotation extendedAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
	writeNewLine(buffer, lineSeparator, tabNumber + 1);
	final int typeIndex = extendedAnnotation.getTypeIndex();
	final char[] typeName = CharOperation.replaceOnCopy(extendedAnnotation.getTypeName(), '/', '.');
	buffer.append(
		Messages.bind(Messages.disassembler_extendedannotationentrystart, new String[] {
			Integer.toString(typeIndex),
			new String(returnClassName(Signature.toCharArray(typeName), '.', mode))
		}));
	final IAnnotationComponent[] components = extendedAnnotation.getComponents();
	for (int i = 0, max = components.length; i < max; i++) {
		disassemble(components[i], buffer, lineSeparator, tabNumber + 1, mode);
	}
	writeNewLine(buffer, lineSeparator, tabNumber + 2);
	int targetType = extendedAnnotation.getTargetType();
	buffer.append(
			Messages.bind(Messages.disassembler_extendedannotation_targetType, new String[] {
				Integer.toHexString(targetType),
				getTargetType(targetType),
			}));
	switch(targetType) {
		case IExtendedAnnotationConstants.METHOD_RECEIVER :
		case IExtendedAnnotationConstants.METHOD_RETURN:
		case IExtendedAnnotationConstants.FIELD :
			break;
		default:
			writeNewLine(buffer, lineSeparator, tabNumber + 2);
			disassembleTargetTypeContents(false, targetType, extendedAnnotation, buffer, lineSeparator, tabNumber, mode);
	}
	disassembleTypePathContents(targetType, extendedAnnotation, buffer, lineSeparator, tabNumber, mode);
	writeNewLine(buffer, lineSeparator, tabNumber + 1);
	buffer.append(Messages.disassembler_extendedannotationentryend);
}
 
Example 10
Source File: BinaryMethod.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private String getReturnType(IBinaryMethod info) {
	char[] genericSignature = info.getGenericSignature();
	char[] signature = genericSignature == null ? info.getMethodDescriptor() : genericSignature;
	char[] dotBasedSignature = CharOperation.replaceOnCopy(signature, '/', '.');
	String returnTypeName= Signature.getReturnType(new String(dotBasedSignature));
	return new String(ClassFile.translatedName(returnTypeName.toCharArray()));
}
 
Example 11
Source File: BinaryType.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @see IType#getTypeParameterSignatures()
 * @since 3.0
 */
public String[] getTypeParameterSignatures() throws JavaModelException {
	IBinaryType info = (IBinaryType) getElementInfo();
	char[] genericSignature = info.getGenericSignature();
	if (genericSignature == null)
		return CharOperation.NO_STRINGS;

	char[] dotBaseSignature = CharOperation.replaceOnCopy(genericSignature, '/', '.');
	char[][] typeParams = Signature.getTypeParameters(dotBaseSignature);
	return CharOperation.toStrings(typeParams);
}
 
Example 12
Source File: LambdaExpression.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
LambdaExpression(JavaElement parent, org.eclipse.jdt.internal.compiler.ast.LambdaExpression lambdaExpression) {
	super(parent, new String(CharOperation.NO_CHAR));
	this.sourceStart = lambdaExpression.sourceStart;
	this.sourceEnd = lambdaExpression.sourceEnd;
	this.arrowPosition = lambdaExpression.arrowPosition;
	this.interphase = new String(CharOperation.replaceOnCopy(lambdaExpression.resolvedType.genericTypeSignature(), '/', '.'));
	this.elementInfo = makeTypeElementInfo(this, this.interphase, this.sourceStart, this.sourceEnd, this.arrowPosition); 
	this.lambdaMethod = LambdaFactory.createLambdaMethod(this, lambdaExpression);
	this.elementInfo.children = new IJavaElement[] { this.lambdaMethod };
}
 
Example 13
Source File: PackageReferenceLocator.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public static boolean isDeclaringPackageFragment(IPackageFragment packageFragment, ReferenceBinding typeBinding) {
	char[] fileName = typeBinding.getFileName();
	if (fileName != null) {
		// retrieve the actual file name from the full path (sources are generally only containing it already)
		fileName = CharOperation.replaceOnCopy(fileName, '/', '\\'); // ensure to not do any side effect on file name (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=136016)
		fileName = CharOperation.lastSegment(fileName, '\\');

		try {
			switch (packageFragment.getKind()) {
				case IPackageFragmentRoot.K_SOURCE :
					if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(fileName) || !packageFragment.getCompilationUnit(new String(fileName)).exists()) {
						return false; // unit doesn't live in selected package
					}
					break;
				case IPackageFragmentRoot.K_BINARY :
//					if (Util.isJavaFileName(fileName)) { // binary with attached source
//						int length = fileName.length;
//						System.arraycopy(fileName, 0, fileName = new char[length], 0, length - 4); // copy all but extension
//						System.arraycopy(SuffixConstants.SUFFIX_class, 0, fileName, length - 4, 4);
//					}
					if (!Util.isClassFileName(fileName) || !packageFragment.getClassFile(new String(fileName)).exists()) {
						return false; // classfile doesn't live in selected package
					}
					break;
			}
		} catch(JavaModelException e) {
			// unable to determine kind; tolerate this match
		}
	}
	return true; // by default, do not eliminate
}
 
Example 14
Source File: Engine.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public static char[] getSignature(TypeBinding typeBinding) {
	char[] result = null;

	result = typeBinding.genericTypeSignature();

	if (result != null) {
		result = CharOperation.replaceOnCopy(result, '/', '.');
	}
	return result;
}
 
Example 15
Source File: ElementsImpl.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public Name getBinaryName(TypeElement type) {
	TypeElementImpl typeElementImpl = (TypeElementImpl) type;
	ReferenceBinding referenceBinding = (ReferenceBinding) typeElementImpl._binding;
	return new NameImpl(
		CharOperation.replaceOnCopy(referenceBinding.constantPoolName(), '/', '.'));
}
 
Example 16
Source File: JavadocContents.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private String computeMethodAnchorPrefixEnd(BinaryMethod method) throws JavaModelException {
	String typeQualifiedName = null;
	if (this.type.isMember()) {
		IType currentType = this.type;
		StringBuffer buffer = new StringBuffer();
		while (currentType != null) {
			buffer.insert(0, currentType.getElementName());
			currentType = currentType.getDeclaringType();
			if (currentType != null) {
				buffer.insert(0, '.');
			}
		}
		typeQualifiedName = new String(buffer.toString());
	} else {
		typeQualifiedName = this.type.getElementName();
	}
	
	String methodName = method.getElementName();
	if (method.isConstructor()) {
		methodName = typeQualifiedName;
	}
	IBinaryMethod info = (IBinaryMethod) method.getElementInfo();

	char[] genericSignature = info.getGenericSignature();
	String anchor = null;
	if (genericSignature != null) {
		genericSignature = CharOperation.replaceOnCopy(genericSignature, '/', '.');
		anchor = Util.toAnchor(0, genericSignature, methodName, Flags.isVarargs(method.getFlags()));
		if (anchor == null) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, method));
	} else {
		anchor = Signature.toString(method.getSignature().replace('/', '.'), methodName, null, true, false, Flags.isVarargs(method.getFlags()));
	}
	IType declaringType = this.type;
	if (declaringType.isMember()) {
		// might need to remove a part of the signature corresponding to the synthetic argument (only for constructor)
		if (method.isConstructor() && !Flags.isStatic(declaringType.getFlags())) {
			int indexOfOpeningParen = anchor.indexOf('(');
			if (indexOfOpeningParen == -1) {
				// should not happen as this is a method signature
				return null;
			}
			int index = indexOfOpeningParen;
			indexOfOpeningParen++;
			int indexOfComma = anchor.indexOf(',', index);
			if (indexOfComma != -1) {
				index = indexOfComma + 2;
			} else {
				// no argument, but a synthetic argument
				index = anchor.indexOf(')', index);
			}
			anchor = anchor.substring(0, indexOfOpeningParen) + anchor.substring(index);
		}
	}
	return anchor + JavadocConstants.ANCHOR_PREFIX_END;
}
 
Example 17
Source File: LambdaFactory.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private static String getTypeSignature(JavaModelManager manager, TypeBinding type) {
	char[] signature = type.genericTypeSignature();
	signature = CharOperation.replaceOnCopy(signature, '/', '.');
	return manager.intern(new String(signature));
}
 
Example 18
Source File: ClassFileMatchLocator.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public static char[] convertClassFileFormat(char[] name) {
	return CharOperation.replaceOnCopy(name, '/', '.');
}
 
Example 19
Source File: Disassembler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void disassemble(IAnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
	switch(annotationComponentValue.getTag()) {
		case IAnnotationComponentValue.BYTE_TAG:
		case IAnnotationComponentValue.CHAR_TAG:
		case IAnnotationComponentValue.DOUBLE_TAG:
		case IAnnotationComponentValue.FLOAT_TAG:
		case IAnnotationComponentValue.INTEGER_TAG:
		case IAnnotationComponentValue.LONG_TAG:
		case IAnnotationComponentValue.SHORT_TAG:
		case IAnnotationComponentValue.BOOLEAN_TAG:
		case IAnnotationComponentValue.STRING_TAG:
			IConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
			String value = null;
			switch(constantPoolEntry.getKind()) {
				case IConstantPoolConstant.CONSTANT_Long :
					value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
					break;
				case IConstantPoolConstant.CONSTANT_Float :
					value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
					break;
				case IConstantPoolConstant.CONSTANT_Double :
					value = Double.toString(constantPoolEntry.getDoubleValue());
					break;
				case IConstantPoolConstant.CONSTANT_Integer:
					StringBuffer temp = new StringBuffer();
					switch(annotationComponentValue.getTag()) {
						case IAnnotationComponentValue.CHAR_TAG :
							temp.append('\'');
							escapeChar(temp, (char) constantPoolEntry.getIntegerValue());
							temp.append('\'');
							break;
						case IAnnotationComponentValue.BOOLEAN_TAG :
							temp.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
							break;
						case IAnnotationComponentValue.BYTE_TAG :
							temp.append("(byte) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
							break;
						case IAnnotationComponentValue.SHORT_TAG :
							temp.append("(short) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
							break;
						case IAnnotationComponentValue.INTEGER_TAG :
							temp.append("(int) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
					}
					value = String.valueOf(temp);
					break;
				case IConstantPoolConstant.CONSTANT_Utf8:
					value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
			}
			buffer.append(Messages.bind(Messages.disassembler_annotationdefaultvalue, value));
			break;
		case IAnnotationComponentValue.ENUM_TAG:
			final int enumConstantTypeNameIndex = annotationComponentValue.getEnumConstantTypeNameIndex();
			final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
			final int enumConstantNameIndex = annotationComponentValue.getEnumConstantNameIndex();
			final char[] constantName = annotationComponentValue.getEnumConstantName();
			buffer.append(Messages.bind(Messages.disassembler_annotationenumvalue,
				new String[] {
					Integer.toString(enumConstantTypeNameIndex),
					Integer.toString(enumConstantNameIndex),
					new String(returnClassName(Signature.toCharArray(typeName), '.', mode)),
					new String(constantName)
				}));
			break;
		case IAnnotationComponentValue.CLASS_TAG:
			final int classIndex = annotationComponentValue.getClassInfoIndex();
			constantPoolEntry = annotationComponentValue.getClassInfo();
			final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
			buffer.append(Messages.bind(Messages.disassembler_annotationclassvalue,
				new String[] {
					Integer.toString(classIndex),
					new String(returnClassName(Signature.toCharArray(className), '.', mode))
				}));
			break;
		case IAnnotationComponentValue.ANNOTATION_TAG:
			buffer.append(Messages.disassembler_annotationannotationvalue);
			IAnnotation annotation = annotationComponentValue.getAnnotationValue();
			disassemble(annotation, buffer, lineSeparator, tabNumber + 1, mode);
			break;
		case IAnnotationComponentValue.ARRAY_TAG:
			buffer.append(Messages.disassembler_annotationarrayvaluestart);
			final IAnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
			for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
				writeNewLine(buffer, lineSeparator, tabNumber + 1);
				disassemble(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
			}
			writeNewLine(buffer, lineSeparator, tabNumber + 1);
			buffer.append(Messages.disassembler_annotationarrayvalueend);
	}
}
 
Example 20
Source File: Disassembler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void disassembleAsModifier(IAnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
	switch(annotationComponentValue.getTag()) {
		case IAnnotationComponentValue.BYTE_TAG:
		case IAnnotationComponentValue.CHAR_TAG:
		case IAnnotationComponentValue.DOUBLE_TAG:
		case IAnnotationComponentValue.FLOAT_TAG:
		case IAnnotationComponentValue.INTEGER_TAG:
		case IAnnotationComponentValue.LONG_TAG:
		case IAnnotationComponentValue.SHORT_TAG:
		case IAnnotationComponentValue.BOOLEAN_TAG:
		case IAnnotationComponentValue.STRING_TAG:
			IConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
			String value = null;
			switch(constantPoolEntry.getKind()) {
				case IConstantPoolConstant.CONSTANT_Long :
					value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
					break;
				case IConstantPoolConstant.CONSTANT_Float :
					value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
					break;
				case IConstantPoolConstant.CONSTANT_Double :
					value = Double.toString(constantPoolEntry.getDoubleValue());
					break;
				case IConstantPoolConstant.CONSTANT_Integer:
					StringBuffer temp = new StringBuffer();
					switch(annotationComponentValue.getTag()) {
						case IAnnotationComponentValue.CHAR_TAG :
							temp.append('\'');
							escapeChar(temp, (char) constantPoolEntry.getIntegerValue());
							temp.append('\'');
							break;
						case IAnnotationComponentValue.BOOLEAN_TAG :
							temp.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
							break;
						case IAnnotationComponentValue.BYTE_TAG :
							temp.append("(byte) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
							break;
						case IAnnotationComponentValue.SHORT_TAG :
							temp.append("(short) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
							break;
						case IAnnotationComponentValue.INTEGER_TAG :
							temp.append("(int) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
					}
					value = String.valueOf(temp);
					break;
				case IConstantPoolConstant.CONSTANT_Utf8:
					value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
			}
			buffer.append(value);
			break;
		case IAnnotationComponentValue.ENUM_TAG:
			final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
			final char[] constantName = annotationComponentValue.getEnumConstantName();
			buffer.append(returnClassName(Signature.toCharArray(typeName), '.', mode)).append('.').append(constantName);
			break;
		case IAnnotationComponentValue.CLASS_TAG:
			constantPoolEntry = annotationComponentValue.getClassInfo();
			final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
			buffer.append(returnClassName(Signature.toCharArray(className), '.', mode));
			break;
		case IAnnotationComponentValue.ANNOTATION_TAG:
			IAnnotation annotation = annotationComponentValue.getAnnotationValue();
			disassembleAsModifier(annotation, buffer, lineSeparator, tabNumber + 1, mode);
			break;
		case IAnnotationComponentValue.ARRAY_TAG:
			final IAnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
			buffer.append('{');
			for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
				if (i > 0) {
					buffer.append(',');
				}
				disassembleAsModifier(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
			}
			buffer.append('}');
	}
}