Package mondrian.util

Class ClassResolver.AbstractClassResolver

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.lang.Class<T> forName​(java.lang.String className, boolean initialize)
      Equivalent of Class.forName(String, boolean, ClassLoader).
      protected abstract java.lang.ClassLoader getClassLoader()
      Returns the class loader to use for the current operation.
      protected java.lang.ClassLoader getClassLoaderNotNull()
      Returns the class loader to use for the current operation, never null.
      java.lang.Iterable<java.net.URL> getResources​(java.lang.String name)
      Equivalent of ClassLoader.getResources(String).
      <T> T instantiateSafe​(java.lang.String className, java.lang.Object... args)
      Instantiates a class and constructs an instance using the given arguments.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractClassResolver

        public AbstractClassResolver()
    • Method Detail

      • instantiateSafe

        public <T> T instantiateSafe​(java.lang.String className,
                                     java.lang.Object... args)
        Description copied from interface: ClassResolver
        Instantiates a class and constructs an instance using the given arguments.
        Specified by:
        instantiateSafe in interface ClassResolver
        Type Parameters:
        T - Desired type
        Parameters:
        className - Class name
        args - Arguments
      • forName

        public <T> java.lang.Class<T> forName​(java.lang.String className,
                                              boolean initialize)
                                       throws java.lang.ClassNotFoundException
        Description copied from interface: ClassResolver
        Equivalent of Class.forName(String, boolean, ClassLoader).
        Specified by:
        forName in interface ClassResolver
        Throws:
        java.lang.ClassNotFoundException
      • getClassLoader

        protected abstract java.lang.ClassLoader getClassLoader()
        Returns the class loader to use for the current operation. May be null.
      • getClassLoaderNotNull

        protected java.lang.ClassLoader getClassLoaderNotNull()
        Returns the class loader to use for the current operation, never null.
      • getResources

        public java.lang.Iterable<java.net.URL> getResources​(java.lang.String name)
                                                      throws java.io.IOException
        Description copied from interface: ClassResolver
        Equivalent of ClassLoader.getResources(String).
        Specified by:
        getResources in interface ClassResolver
        Throws:
        java.io.IOException