//TODO: looks like we want IssuesReporter to be an interface
IssuesReporter issuesReporter = new IssuesReporter(null, null) {
@Override
public List<ClassIssues> getMostImportantIssues() {
ClassCost aClassCost = new ClassCost("com/google/FooClass", Arrays.asList(methodCost));
importantIssues.add(determineIssues(aClassCost));
return importantIssues;
}
@Override
public void inspectClass(ClassCost classCost) {
}
@Override
public ClassIssues determineIssues(ClassCost classCost) {
return new ClassIssues("com/google/FooClass", 100, new LinkedList<Issue>(Arrays.asList(issue)));
}
};
ReportOptions options = new ReportOptions(1, 10, 1, 10, 20, 5, 100, 100, 1, 10, "", "");
SourceLinker linker = new SourceLinker("http://code.repository/basepath/{path}&line={line}",
"http://code.repository/basepath/{path}");
cost = new ClassCost(getClass().getName(), Arrays.asList(methodCost));
HtmlReportModel report =
new HtmlReportModel(costModel, new AnalysisModel(issuesReporter), options);
BeansWrapper objectWrapper = new DefaultObjectWrapper();
Configuration configuration = new Configuration();
configuration.setObjectWrapper(objectWrapper);