Class ClassConfig.RunFile

java.lang.Object
com.tnsai.annotations.ClassConfig.RunFile
Enclosing class:
ClassConfig

public static final class ClassConfig.RunFile extends Object
A run file as a host passes it to ClassConfig.useBaseDirectory(RunFile) and ClassConfig.checkAgents(RunFile): its base directory, its name for messages, its Agents section and, optionally, the agent types of the run. Immutable: a wither returns a new run file.
Since:
0.18.2
  • Method Details

    • of

      public static ClassConfig.RunFile of(Path base, String source, String agents)
      A run file whose keys match lazily.
      Parameters:
      base - the directory a relative path resolves against, made absolute when used; null for the working directory
      source - the run file, for messages
      agents - the Agents section as JSON text; null or blank for none
      Returns:
      the run file
      Since:
      0.18.2
    • agentTypes

      public ClassConfig.RunFile agentTypes(Collection<Class<?>> types)
      This run file with the agent types of the run, the host's complete registry, so every key resolves against them before the run starts.
      Parameters:
      types - the agent types; a role class among them takes no section
      Returns:
      a new run file
      Since:
      0.18.2