Class GshTemplateClassLoaderRegistry.GshTemplateCachedClass

java.lang.Object
edu.internet2.middleware.grouper.app.gsh.template.GshTemplateClassLoaderRegistry.GshTemplateCachedClass
Enclosing class:
GshTemplateClassLoaderRegistry

public static class GshTemplateClassLoaderRegistry.GshTemplateCachedClass extends Object
One template version's cache entry — the source hash that produced it, the classloader holding its bytecode, and the loaded class. The templateClass type is Class<?> — the registry does not assert any particular base class. Each templateType's dispatcher (Phase 7 work) does an asSubclass() to the appropriate framework base (GshTemplateV2 for gsh/abac, GshTemplateProvisionerBase for provisioner, GrouperTemplateDaemon for daemon, etc.) and surfaces a clear error if the author got the base wrong. See GRP-7011 for the type framework.
  • Method Details

    • getSourceHash

      public String getSourceHash()
      Returns:
      SHA-1 hex of the source string that compiled to this entry
    • getByteArrayClassLoader

      public ByteArrayClassLoader getByteArrayClassLoader()
      Returns:
      the loader holding this version's bytecode
    • getTemplateClass

      public Class<?> getTemplateClass()
      Returns:
      the loaded class. Type is Class<?> — caller is responsible for casting to the appropriate framework base via asSubclass() based on templateType.