LocalInspectionTool (String toolString) { if ("StaticCallOnSubclassInspection".equals(toolString)) return new StaticCallOnSubclassInspection(); if ("StaticFieldReferenceOnSubclassInspection".equals(toolString)) return new StaticFieldReferenceOnSubclassInspection(); if ("NullableStuffInspection".equals(toolString)) return new NullableStuffInspection(); if ("DataFlowInspection".equals(toolString)) return new DataFlowInspection(); throw new IllegalArgumentException("Can't find inspection tool with identifier: " + toolString); }