Class C2Helper.Builder

java.lang.Object
org.refcodes.archetype.C2Helper.Builder
Enclosing class:
C2Helper

public static final class C2Helper.Builder extends Object
Builder to build C2Helper instances.
  • Method Details

    • withLogger

      public C2Helper.Builder withLogger(org.refcodes.logger.RuntimeLogger aLogger)
      Builder method providing the application's RuntimeLogger.
      Parameters:
      aLogger - The application's RuntimeLogger.
      Returns:
      This C2Helper.Builder as of the builder pattern.
    • withInstanceAlias

      public C2Helper.Builder withInstanceAlias(String aInstanceAlias)
      Builder method providing the application's instance alias.
      Parameters:
      aInstanceAlias - The application's alias identifying the instance.
      Returns:
      This C2Helper.Builder as of the builder pattern.
    • withResourceLocator

      public C2Helper.Builder withResourceLocator(Class<?> aResourceLocator)
      Builder method providing the Class when doing a lookup of a (module specific) resource.
      Parameters:
      aResourceLocator - The application's Class which to use when loading resources (of the according module) by invoking Class.getResourceAsStream(String).
      Returns:
      This C2Helper.Builder as of the builder pattern.
    • withVerbose

      public C2Helper.Builder withVerbose(boolean isVerbose)
      Builder method setting the application's verbose mode.
      Parameters:
      isVerbose - True in case to be more verbose.
      Returns:
      This C2Helper.Builder as of the builder pattern.
    • withForce

      public C2Helper.Builder withForce(boolean isForce)
      Builder method setting the application's force mode.
      Parameters:
      isForce - True in case to be more verbose.
      Returns:
      This C2Helper.Builder as of the builder pattern.
    • build

      public C2Helper build() throws IOException
      Creates a new C2Helper using the configured properties.
      Returns:
      The accordingly configured C2Helper.
      Throws:
      IOException - thrown in I/O problems occurred building the C2Helper.