return DEFAULT_TOKENIZER;
}
private static Tokenizer resolveTokenizerOnClassLevel(Class<?> declaringClass) {
Separator separatorAnnotationOnClassLevel = declaringClass.getAnnotation(Separator.class);
TokenizerClass tokenizerClassAnnotationOnClassLevel = declaringClass.getAnnotation(TokenizerClass.class);
if (separatorAnnotationOnClassLevel != null && tokenizerClassAnnotationOnClassLevel != null)
throw unsupported(
"You cannot specify @Separator and @TokenizerClass both together on class level for '%s'",
declaringClass.getCanonicalName());
if (separatorAnnotationOnClassLevel != null)
return new SplitAndTrimTokenizer(separatorAnnotationOnClassLevel.value());
if (tokenizerClassAnnotationOnClassLevel != null)
return createTokenizer(tokenizerClassAnnotationOnClassLevel.value());
return null;