Class SyntheticRepository

All Implemented Interfaces:
Repository

public class SyntheticRepository extends MemorySensitiveClassPathRepository
This repository is used in situations where a Class is created outside the realm of a ClassLoader. Classes are loaded from the file systems using the paths specified in the given class path. By default, this is the value returned by ClassPath.getClassPath().

This repository uses a factory design, allowing it to maintain a collection of different classpaths, and as such It is designed to be used as a singleton per classpath.

See Also:
  • Field Details

  • Constructor Details

    • SyntheticRepository

      private SyntheticRepository(ClassPath path)
  • Method Details

    • getInstance

      public static SyntheticRepository getInstance()
      Gets the singleton instance for the system class path.
      Returns:
      The singleton instance.
    • getInstance

      public static SyntheticRepository getInstance(ClassPath classPath)
      Gets the singleton instance for the given class path.
      Parameters:
      classPath - The class path.
      Returns:
      The singleton instance.