/** * Get an extension point by its name Return null if no extensionPointReport where found with this * name * * @param name represent the extension point name * @return an extension point report */ public ExtensionPointReport getExtensionPointReport(String name) { if (name == null || name.equals("")) { throw new IllegalArgumentException("extension point name cannot be null"); } maybeConfigureExtensionPoints(); for (ExtensionPointReport extensionPointReport : extensionPointReports) { if (extensionPointReport.getName().equals(name)) { return extensionPointReport; } } return null; }
private void maybeConfigureExtensionPoints() { if (!extensionPointsConfigured) { for (TargetReport targetReport : targetReports) { if (targetReport.getExtensionPoint() != null) { for (ExtensionPointReport extensionPointReport : extensionPointReports) { if (extensionPointReport.getName().equals(targetReport.getExtensionPoint())) { extensionPointReport.addTargetReport(targetReport); } } } } extensionPointsConfigured = true; } }