1 23 package org.hammurapi.inspectors; 24 25 import org.hammurapi.InspectorBase; 26 27 import com.pavelvlasov.jsel.JselException; 28 import com.pavelvlasov.jsel.Method; 29 30 31 37 public class VariablesAndMethodsNameClashingRule extends InspectorBase { 38 39 45 public void visit(Method element) { 46 try { 47 if (element.getEnclosingScope().getVariableNamespace().find(element.getName())!=null) { 48 context.reportViolation(element); 49 } 50 } catch (JselException e) { 51 context.warn(element, e); 52 } 53 } 54 55 } 56 | Popular Tags |