ottlinger commented on code in PR #233: URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1555624677
########## apache-rat-core/src/main/java/org/apache/rat/analysis/IHeaderMatcher.java: ########## @@ -110,10 +71,39 @@ public String toString() { interface Builder { /** * Build the IHeaderMatcher. + * + * Implementations of this interface should return a specific child class of IHeaderMatcher. + * * @return a new IHeaderMatcher. */ IHeaderMatcher build(); + /** + * Gets the class that is build by this builder. + * @return The class that is build by this builder. + */ + default Class<?> builtClass() throws SecurityException { + try { + return this.getClass().getMethod("build").getReturnType(); + } catch (NoSuchMethodException | SecurityException e) { + throw new IllegalStateException("the 'build' method of the Builder interface must alwasy be public"); Review Comment: typo: always -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org