From b5479eeb63857edc843fe0fb6c60e6e0c5cedb4c Mon Sep 17 00:00:00 2001 From: James Yoo <24359440+jyoo980@users.noreply.github.com> Date: Mon, 2 Dec 2024 07:43:57 -0800 Subject: [PATCH] Subtypes of `AggregateChecker` should override `getSupportedChecker` (#6905) --- docs/manual/creating-a-checker.tex | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/manual/creating-a-checker.tex b/docs/manual/creating-a-checker.tex index 958d295d2f4..5867a31e7a9 100644 --- a/docs/manual/creating-a-checker.tex +++ b/docs/manual/creating-a-checker.tex @@ -1073,14 +1073,17 @@ \noindent if you define an aggregate checker class. Extend \refclass{framework/source}{AggregateChecker} and override -the \ method, like the following: +the \ method, like the following: \begin{Verbatim} public class MyUnitCheckers extends AggregateChecker { - protected Set> getImmediateSubcheckerClasses() { - return new LinkedHashSet<>(Arrays.asList(DistanceUnitChecker.class, - VelocityUnitChecker.class, - MassUnitChecker.class)); + @Override + protected Collection> getSupportedCheckers() { + Collection> checkers = new ArrayList<>(3); + Collections.addAll( + checkers, + DistanceUnitChecker.class, VelocityUnitChecker.class, MassUnitChecker.class); + return checkers; } } \end{Verbatim}