methodAnnotationUse.param("value", "unchecked");
for (JTypeVar visitorTypeParameter: visitorInterface.getValueTypeParameters()) {
Types.generifyWithBoundsFrom(factoryMethod, visitorTypeParameter.name(), visitorTypeParameter);
}
AbstractJClass usedValueClassType = valueClass.narrow(factoryMethod.typeParams());
AbstractJClass usedFactoryType = factory.narrow(factoryMethod.typeParams());
factoryMethod.type(visitorInterface.narrowed(usedValueClassType, usedValueClassType, types._RuntimeException));
IJExpression result = JExpr.ref("FACTORY");
result = usedFactoryType.getTypeParameters().isEmpty() ? result : JExpr.cast(usedFactoryType, result);
factoryMethod.body()._return(result);
return factoryMethod;