KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > inspectors > SystemGcMisuseRule


1 /*
2  * Created on 27.02.2004
3  *
4  * To change the template for this generated file go to
5  * Window - Preferences - Java - Code Generation - Code and Comments
6  */

7 package org.hammurapi.inspectors;
8
9 import org.hammurapi.InspectorBase;
10
11 import com.pavelvlasov.jsel.expressions.MethodCall;
12 import com.pavelvlasov.review.SourceMarker;
13
14 /**
15  * @author mucbj0, modified by c8982
16  *
17  * To change the template for this generated type comment go to
18  * Window - Preferences - Java - Code Generation - Code and Comments
19  */

20 public class SystemGcMisuseRule extends InspectorBase {
21         
22     public void visit(MethodCall methodCall) {
23         if ("System.gc(".equals(methodCall.toString())) {
24             context.reportViolation((SourceMarker) methodCall);
25         }
26     }
27 }
28
29
Popular Tags