001 package edu.rice.cs.cunit.instrumentors.threadCheck; 002 003 import edu.rice.cs.cunit.instrumentors.util.CompoundStrategy; 004 005 import java.util.List; 006 007 /** 008 * Compound instrumentor for the reflection-based Thread Check strategy. 009 * @author Mathias Ricken 010 */ 011 public class CompoundReflectionThreadCheckStrategy extends CompoundStrategy { 012 /** 013 * Create a new compound instrumentor for the reflection-based Thread Check strategies. 014 * @param parameters parameters for the instrumentors 015 */ 016 public CompoundReflectionThreadCheckStrategy(List<String> parameters) { 017 super(parameters); 018 AThreadCheckStrategy.SharedData sharedData = 019 new AThreadCheckStrategy.SharedData(parameters); 020 AAddThreadCheckStrategy.SharedAddData sharedAddData = 021 new AAddThreadCheckStrategy.SharedAddData(parameters,sharedData); 022 023 getCombined().add(sharedData); // collects warnings from AThreadCheckStrategy instances 024 getCombined().add(sharedAddData); // collects warnings from AAddThreadCheckStrategy instances 025 getCombined().add(new AddReflectionThreadCheckStrategy(parameters, 026 sharedData, 027 sharedAddData)); // add reflection-bsaed thread checks 028 } 029 }