/** * Converts a Java object into an equivalent SoyValueProvider. * * @param obj The object to convert. * @return An equivalent SoyValueProvider. * @throws SoyDataException If the given object cannot be converted. */ @Nonnull public SoyValueProvider convert(@Nullable Object obj) { SoyValueProvider convertedPrimitive = convertCheap(obj); if (convertedPrimitive != null) { return convertedPrimitive; } return convertNonPrimitive(obj); }
/** * Converts a Java object into an equivalent SoyValueProvider. * * @param obj The object to convert. * @return An equivalent SoyValueProvider. * @throws SoyDataException If the given object cannot be converted. */ @Nonnull public SoyValueProvider convert(@Nullable Object obj) { SoyValueProvider convertedPrimitive = convertCheap(obj); if (convertedPrimitive != null) { return convertedPrimitive; } return convertNonPrimitive(obj); }