コード例 #1
0
 /**
  * Adds an input Soy file, given the file content provided as a string, as well as the desired
  * file path for messages.
  *
  * @param content The Soy file content.
  * @param filePath The path to the Soy file (used for messages only).
  * @return This builder.
  */
 public Builder add(CharSequence content, String filePath) {
   listBuilder.add(SoyFileSupplier.Factory.create(content, filePath));
   return this;
 }
コード例 #2
0
 /**
  * Adds an input Soy file, given a resource {@code URL}, as well as the desired file path for
  * messages.
  *
  * @param inputFileUrl The Soy file.
  * @param filePath The path to the Soy file (used for messages only).
  * @return This builder.
  */
 public Builder add(URL inputFileUrl, String filePath) {
   listBuilder.add(SoyFileSupplier.Factory.create(inputFileUrl, filePath));
   return this;
 }
コード例 #3
0
 /**
  * Adds an input Soy file, given a resource {@code URL}.
  *
  * <p>Important: This function assumes that the desired file path is returned by {@code
  * inputFileUrl.toString()}. If this is not the case, please use {@link #add(URL, String)}
  * instead.
  *
  * @see #add(URL, String)
  * @param inputFileUrl The Soy file.
  * @return This builder.
  */
 public Builder add(URL inputFileUrl) {
   listBuilder.add(SoyFileSupplier.Factory.create(inputFileUrl));
   return this;
 }
コード例 #4
0
 /**
  * Adds an input Soy file, given an {@code InputSupplier} for the file content, as well as the
  * desired file path for messages.
  *
  * @param contentSupplier Supplier of a Reader for the Soy file content.
  * @param filePath The path to the Soy file (used for messages only).
  * @return This builder.
  */
 public Builder add(InputSupplier<? extends Reader> contentSupplier, String filePath) {
   listBuilder.add(SoyFileSupplier.Factory.create(contentSupplier, filePath));
   return this;
 }