update copyright
[fedora-idea.git] / java / java-impl / src / com / intellij / refactoring / openapi / impl / TypeCookRefactoringImpl.java
blobcd1e43c249e72a63133f3b44ed1733396e3af1f7
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.refactoring.openapi.impl;
18 import com.intellij.openapi.project.Project;
19 import com.intellij.psi.PsiElement;
20 import com.intellij.refactoring.RefactoringImpl;
21 import com.intellij.refactoring.TypeCookRefactoring;
22 import com.intellij.refactoring.typeCook.Settings;
23 import com.intellij.refactoring.typeCook.TypeCookProcessor;
25 import java.util.List;
27 /**
28 * @author dsl
30 public class TypeCookRefactoringImpl extends RefactoringImpl<TypeCookProcessor> implements TypeCookRefactoring {
31 TypeCookRefactoringImpl(Project project,
32 PsiElement[] elements,
33 final boolean dropObsoleteCasts,
34 final boolean leaveObjectsRaw,
35 final boolean preserveRawArrays,
36 final boolean exhaustiveSearch,
37 final boolean cookObjects,
38 final boolean cookToWildcards) {
39 super(new TypeCookProcessor(project, elements, new Settings() {
40 public boolean dropObsoleteCasts() {
41 return dropObsoleteCasts;
44 public boolean leaveObjectParameterizedTypesRaw() {
45 return leaveObjectsRaw;
48 public boolean exhaustive() {
49 return exhaustiveSearch;
52 public boolean cookObjects() {
53 return cookObjects;
56 public boolean cookToWildcards() {
57 return cookToWildcards;
60 public boolean preserveRawArrays() {
61 return preserveRawArrays;
63 }));
66 public List<PsiElement> getElements() {
67 return myProcessor.getElements();