class UppercaseNounReadingFilter extends RuleFilter {

  @Nullable
  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> arguments, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) {<FILL_FUNCTION_BODY>}
}

    String token = arguments.get("token");
    if (token == null) {
      throw new RuntimeException("Set 'token' for filter " + UppercaseNounReadingFilter.class.getName() + " in rule " + match.getRule().getId());
    }
    try {
      String uppercase = StringTools.uppercaseFirstChar(token);
      List<AnalyzedTokenReadings> tags = GermanTagger.INSTANCE.tag(Collections.singletonList(uppercase));
      boolean hasNounReading = false;
      for (AnalyzedTokenReadings tag : tags) {
        if (tag.hasPartialPosTag("SUB:") && !tag.hasPartialPosTag("ADJ")) {
          hasNounReading = true;
          break;
        }
      }
      if (hasNounReading) {
        return match;
      }
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    return null;
  
<methods>public non-sealed void <init>() ,public abstract org.languagetool.rules.RuleMatch acceptRuleMatch(org.languagetool.rules.RuleMatch, Map<java.lang.String,java.lang.String>, int, org.languagetool.AnalyzedTokenReadings[], List<java.lang.Integer>) throws java.io.IOException,public boolean matches(Map<java.lang.String,java.lang.String>, org.languagetool.AnalyzedTokenReadings[], int, List<java.lang.Integer>) throws java.io.IOException<variables>