Bug 24025 Quick fix create method gets wrong parameters if parameters are arrays
Steps: 1)type somewhere: Object[] test1= new Object[]{}; Object[] test2= new Object[]{}; if(compareTheseArrays(test1,test2)){ System.out.println("they are the same"); } 2)A Quick fix icon will appear and ask you to create Method compareTheseArrays, select this. 3)note that the method created takes Object as parameters and not Object[]. Should this be? version. 20020920. JRT.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
}
	
	public static Type getTypeFromTypeBinding(AST ast, ITypeBinding binding) {
		if (binding.isArray()) {
			int dim= binding.getDimensions();
			return ast.newArrayType(getTypeFromTypeBinding(ast, binding.getElementType()), dim);
		} else if (binding.isPrimitive()) {
			String name= binding.getName();
			return ast.newPrimitiveType(PrimitiveType.toCode(name));
		} else if (!binding.isNullType() && !binding.isAnonymous()) {
			return ast.newSimpleType(ast.newSimpleName(binding.getName()));
		}
		return null;
	}
	
	public static Expression getInitExpression(Type type) {
		if (type.isPrimitiveType()) {
			PrimitiveType primitiveType= (PrimitiveType) type;
			if (primitiveType.getPrimitiveTypeCode() == PrimitiveType.BOOLEAN) {
				return type.getAST().newBooleanLiteral(false);
			} else if (primitiveType.getPrimitiveTypeCode() == PrimitiveType.VOID) {
				return null;				
			} else {
				return type.getAST().newNumberLiteral("0");
			}
		}
		return type.getAST().newNullLiteral();
	}
	
	private static class NodeFoundException extends RuntimeException {