Class AbstractTearOff<CLT,​S,​E extends Exception>

  • Type Parameters:
    CLT - ClassLoader tear-off.

    public abstract class AbstractTearOff<CLT,​S,​E extends Exception>
    extends CachingScriptLoader<S,​E>
    Partial default implementation of tear-off class, for convenience of derived classes.
    Kohsuke Kawaguchi
    • Field Detail

      • classLoader

        protected final CLT classLoader
    • Constructor Detail

      • AbstractTearOff

        protected AbstractTearOff​(MetaClass owner,
                                  Class<CLT> cltClass)
    • Method Detail

      • getWebApp

        protected final WebApp getWebApp()
      • getDefaultScriptExtension

        protected abstract String getDefaultScriptExtension()
        The file extension of this kind of scripts, such as ".jelly"
      • hasAllowedExtension

        protected boolean hasAllowedExtension​(String name)
        Checks if the file name is allowed as a script of this type. This is necessary to have multiple facets co-exist peacefully without them trying to load each other's scripts.
      • resolveScript

        public S resolveScript​(String name)
                        throws E extends Exception
        Loads the script just from the target class without considering inherited scripts from its base types.
        E extends Exception
      • parseScript

        protected abstract S parseScript​(URL res)
                                  throws E extends Exception
        Compiles a script into the compiled form.
        E extends Exception