KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > refactoring > experimental > CleanUpRefactoring


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Leon Chiver. All Rights Reserved.
17  */

18 package org.netbeans.modules.refactoring.experimental;
19
20 import java.util.List JavaDoc;
21 import org.netbeans.modules.refactoring.api.AbstractRefactoring;
22
23 /**
24  * @author leon
25  */

26 public final class CleanUpRefactoring extends AbstractRefactoring {
27
28     private List JavaDoc/*<Resource>*/ resources;
29
30     private boolean removeUnusedImports;
31
32     private boolean commentInsteadOfRemoving;
33
34     private boolean removeUnusedFields;
35
36     private boolean removeUnusedCallableFeatures;
37
38     private boolean removeUnusedLocalVars;
39
40     private boolean removeUnusedClasses;
41
42     private boolean removeRedundantCasts;
43     
44     private boolean processSubpackages;
45
46     public CleanUpRefactoring() {
47     }
48     
49     public List JavaDoc/*<Resource>*/ getResources() {
50         return resources;
51     }
52     
53     public void setResources(List JavaDoc/*<Resource>*/ resources) {
54         this.resources = resources;
55     }
56     
57     protected void setClassPath() {
58     }
59
60     public void setCommentInsteadOfRemoving(boolean commentInsteadOfRemoving) {
61         this.commentInsteadOfRemoving = commentInsteadOfRemoving;
62     }
63
64     public boolean isCommentInsteadOfRemoving() {
65         return commentInsteadOfRemoving;
66     }
67
68     public void setRemoveUnusedFields(boolean removeUnusedFields) {
69         this.removeUnusedFields = removeUnusedFields;
70     }
71
72     public boolean isRemoveUnusedFields() {
73         return removeUnusedFields;
74     }
75
76     public void setRemoveUnusedCallableFeatures(boolean removeUnusedCallableFeatures) {
77         this.removeUnusedCallableFeatures = removeUnusedCallableFeatures;
78     }
79
80     public boolean isRemoveUnusedCallableFeatures() {
81         return removeUnusedCallableFeatures;
82     }
83
84     public void setRemoveUnusedLocalVars(boolean removeUnusedLocalVars) {
85         this.removeUnusedLocalVars = removeUnusedLocalVars;
86     }
87     
88     public boolean isRemoveUnusedLocalVars() {
89         return removeUnusedLocalVars;
90     }
91     
92     public void setRemoveUnusedImports(boolean removeUnusedImports) {
93         this.removeUnusedImports = removeUnusedImports;
94     }
95
96     public boolean isRemoveUnusedImports() {
97         return removeUnusedImports;
98     }
99
100     public void setRemoveRedundantCasts(boolean removeRedundantCasts) {
101         this.removeRedundantCasts = removeRedundantCasts;
102     }
103
104     public boolean isRemoveRedundantCasts() {
105         return removeRedundantCasts;
106     }
107
108     public boolean isRemoveUnusedClasses() {
109         return removeUnusedClasses;
110     }
111
112     public void setRemoveUnusedClasses(boolean removeUnusedClasses) {
113         this.removeUnusedClasses = removeUnusedClasses;
114     }
115
116     public boolean isProcessSubpackages() {
117         return processSubpackages;
118     }
119
120     public void setProcessSubpackages(boolean processSubpackages) {
121         this.processSubpackages = processSubpackages;
122     }
123
124 }
125
Popular Tags