Package org.apache.tapestry5.ioc

# Class IOCUtilities

java.lang.Object
org.apache.tapestry5.ioc.IOCUtilities

public final class IOCUtilities extends Object
A collection of utility methods for a couple of different areas, including creating the initial `Registry`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `addDefaultModules(RegistryBuilder builder)`
  Scans the classpath for JAR Manifests that contain the Tapestry-Module-Classes attribute and adds each corresponding class to the RegistryBuilder.
  `static Registry`
  `buildDefaultRegistry()`
  Construct a default Registry, including modules identifed via the Tapestry-Module-Classes Manifest entry.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### buildDefaultRegistry

    public static Registry buildDefaultRegistry()
    Construct a default Registry, including modules identifed via the Tapestry-Module-Classes Manifest entry. The registry will have been started up before it is returned.
    Returns:
      constructed Registry, after startup
    See Also:
      - `addDefaultModules(RegistryBuilder)`

  - ### addDefaultModules

    public static void addDefaultModules(RegistryBuilder builder)
    Scans the classpath for JAR Manifests that contain the Tapestry-Module-Classes attribute and adds each corresponding class to the RegistryBuilder. In addition, looks for a system property named "tapestry.modules" and adds all of those modules as well. The tapestry.modules approach is intended for development. To prevent auto-loading of Manifest-defined modules the system property named "tapestry.manifest-modules-blacklist" can be used.
    Parameters:
      `builder` - the builder to which modules will be added
    See Also:
      - `ImportModule`
      - `RegistryBuilder.add(String)`