String (@NotNull String customDeclaration) { final Matcher declarationMatcher = DECLARATION_PATTERN.matcher(customDeclaration); if (!declarationMatcher.matches()) { return null; } String loggerType = declarationMatcher.group(1); if (loggerType == null) { loggerType = declarationMatcher.group(2); } return loggerType; }