01: package method;
02:
03: import java.io.*;
04:
05: /**
06: * Description of the Class
07: *
08: *@author Chris Seguin
09: */
10: public class ExtractMethodTestSeven {
11: /**
12: * Description of the Method
13: *
14: *@param file Description of Parameter
15: */
16: public void method(File file) {
17: System.out.println("This is before");
18: extractedMethod(file);
19: System.out.println("This is after");
20: }
21:
22: /**
23: * Description of the Method
24: *
25: *@param file Description of Parameter
26: */
27: private void extractedMethod(File file) {
28: try {
29: PrintWriter output = new PrintWriter(new FileWriter(file));
30:
31: output.println("Line #1");
32:
33: output.close();
34: } catch (IOException ioe) {
35: ioe.printStackTrace();
36: }
37: }
38: }
|