Module watamebot

Class FormattedModuleResource

java.lang.Object
net.foxgenesis.util.resource.ModuleResource
net.foxgenesis.util.resource.FormattedModuleResource

public class FormattedModuleResource extends ModuleResource
A class that points to a resource inside a module and implements methods to read from it after formatting its data.

Properties to format are specified by using a regular expression:

 \{\{(.*?)}}
 
Author:
Ashley
  • Constructor Details

    • FormattedModuleResource

      public FormattedModuleResource(@Nonnull String module, @Nonnull String resource, @Nonnull Map<String,String> mappings)
      Create a new ModuleResource that points to a specified resource inside a module.

      The specified Map will be used to format all data in this resource.

      Parameters:
      module - - name of the Module containing the resource
      resource - - absolute path to the resource
      mappings - - a Map containing all the properties to format
      Throws:
      NullPointerException - If the module name, resource name or mappings are null
  • Method Details