KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > usage > InputUnusedParameter


1 package com.puppycrawl.tools.checkstyle.usage;
2
3 import java.awt.Rectangle JavaDoc;
4
5 /** Test input for unread parameter check */
6 public class InputUnusedParameter
7 {
8     public InputUnusedParameter(int aReadPrimitive, int aUnreadPrimitive)
9     {
10         int i = aReadPrimitive;
11     }
12
13     public void method(
14         String JavaDoc aReadObject,
15         Rectangle JavaDoc aRectangle,
16         Object JavaDoc aUnreadObject)
17     {
18         int i = aReadObject.length();
19
20         int j = aRectangle.x;
21
22         try {
23             i++;
24         }
25         catch (Exception JavaDoc unreadException) {
26         }
27     }
28
29     private void methodArrays(int[] aArray, int[] aArray2, int[] aUnreadArray)
30     {
31         int i = aArray[0];
32         aArray2[0] = 0;
33     }
34
35     private int member = 1;
36     private void methodSameLocalVariable(int member)
37     {
38         int x = member; // refers to the param, not the member
39
}
40 }
41
42 interface Interface
43 {
44     public void method(int aParam);
45 }
46
47 abstract class AbstractClass
48 {
49     public abstract void method(int aParam);
50 }
51
Popular Tags