1 23 package org.hammurapi.inspectors; 24 25 import org.hammurapi.InspectorBase; 26 27 import com.pavelvlasov.jsel.JselException; 28 import com.pavelvlasov.jsel.VariableDefinition; 29 30 31 37 public class ThreadGroupRule extends InspectorBase { 38 39 42 private static final String TG_CLASS_NAME = "java.lang.ThreadGroup"; 43 44 49 public void visit(VariableDefinition element) { 50 try { 51 if (element.getTypeSpecification().getType().isKindOf(TG_CLASS_NAME)) { 52 context.reportViolation(element); 53 } 54 } catch (JselException e) { 55 context.warn(element, e); 56 } 57 } 58 } 59 | Popular Tags |