Skip to content

Commit

Permalink
Rename getTypeFactory() to createTypeFactoryForProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Jul 29, 2021
1 parent 77a7c93 commit 9fe9c72
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -51,7 +51,7 @@ public InitializedFieldsAnnotatedTypeFactory(BaseTypeChecker checker) {
continue;
}
@SuppressWarnings("signature:argument") // -processor is a binary name
GenericAnnotatedTypeFactory<?, ?, ?, ?> atf = getTypeFactory(checkerName);
GenericAnnotatedTypeFactory<?, ?, ?, ?> atf = createTypeFactoryForProcessor(checkerName);
if (atf != null) {
defaultValueAtypeFactories.add(atf);
}
Expand All @@ -61,12 +61,14 @@ public InitializedFieldsAnnotatedTypeFactory(BaseTypeChecker checker) {
}

/**
* Returns the type factory for the given annotation processor, if it is type-checker.
* Creates a new type factory for the given annotation processor, if it is a type-checker. This
* does NOT return an existing type factory.
*
* @param processorName the fully-qualified class name of an annotation processor
* @return the type factory for the given annotation processor, or null if it's not a checker
*/
GenericAnnotatedTypeFactory<?, ?, ?, ?> getTypeFactory(@BinaryName String processorName) {
GenericAnnotatedTypeFactory<?, ?, ?, ?> createTypeFactoryForProcessor(
@BinaryName String processorName) {
try {
Class<?> checkerClass = Class.forName(processorName);
if (!BaseTypeChecker.class.isAssignableFrom(checkerClass)) {
Expand Down

0 comments on commit 9fe9c72

Please sign in to comment.