	public static Class<? extends Object> getType(
			ASTPrimaryPrefix primaryPrefix, ASTPrimarySuffix[] suffixes)
			throws SecurityException, ClassNotFoundException,
			CannotAutocompleteException, NoSuchFieldException,
			NoSuchMethodException {
		String[] parts = CompletionUtils.getNodeUtils().getParts(primaryPrefix,
				Integer.MAX_VALUE, Integer.MAX_VALUE);
		Class<? extends Object> clazz = null;
		for (int i = 0; i < parts.length - 1; i++) {
			clazz = getType(clazz, parts[i]);
		}
		if (clazz == null) {
			Node literalOrName = primaryPrefix.jjtGetChild(0);
			if (literalOrName instanceof ASTLiteral) {
				clazz = getType((ASTLiteral) literalOrName);
			} else {
				clazz = getType(null, getNodeUtils().getText(literalOrName));
				for (int i = 0; i < suffixes.length; i++) {
					if (suffixes[i].first_token.kind == JavaParserConstants.LBRACKET) {
						clazz = clazz.getComponentType();
					}
				}
			}
		} else {
			String methodName = parts[parts.length - 1];
			for (int i = 0; i < suffixes.length; i++) {
				if ((suffixes[0].jjtGetNumChildren() == 1)
						&& (suffixes[0].jjtGetChild(0) instanceof ASTArguments)) {
					Class<? extends Object>[] params = getParams((ASTArguments) suffixes[0]
							.jjtGetChild(0));
					Method method = getMethod(clazz, methodName, params);
					clazz = method.getReturnType();
					methodName = null;
				} else if (suffixes[0].jjtGetNumChildren() == 0) {
					methodName = suffixes[0].first_token.next.image;
				} else {
					throw new CannotAutocompleteException();
				}
			}
		}
		return clazz;
	}

	public static Class<? extends Object> getType(
			ASTPrimaryPrefix primaryPrefix, ASTPrimarySuffix[] suffixes)
			throws SecurityException, ClassNotFoundException,
			CannotAutocompleteException, NoSuchFieldException,
			NoSuchMethodException {
		String[] parts = CompletionUtils.getNodeUtils().getParts(primaryPrefix,
				Integer.MAX_VALUE, Integer.MAX_VALUE);
		Class<? extends Object> clazz = null;
		for (int i = 0; i < parts.length - 1; i++) {
			clazz = getType(clazz, parts[i]);
		}
		if (clazz == null) {
			Node literalOrName = primaryPrefix.jjtGetChild(0);
			if (literalOrName instanceof ASTLiteral) {
				clazz = getType((ASTLiteral) literalOrName);
			} else {
				clazz = getType(null, getNodeUtils().getText(literalOrName));
				for (int i = 0; i < suffixes.length; i++) {
					if (suffixes[i].first_token.kind == JavaParserConstants.LBRACKET) {
						clazz = clazz.getComponentType();
					}
				}
			}
		} else {
			String methodName = parts[parts.length - 1];
			for (int i = 0; i < suffixes.length; i++) {
				if ((suffixes[i].jjtGetNumChildren() == 1)
						&& (suffixes[i].jjtGetChild(0) instanceof ASTArguments)) {
					Class<? extends Object>[] params = getParams((ASTArguments) suffixes[i]
							.jjtGetChild(0));
					Method method = getMethod(clazz, methodName, params);
					clazz = method.getReturnType();
					methodName = null;
				} else if (suffixes[i].jjtGetNumChildren() == 0) {
					methodName = suffixes[i].first_token.next.image;
				} else {
					throw new CannotAutocompleteException();
				}
			}
		}
		return clazz;
	}
