Interface SparkClassUtils

public interface SparkClassUtils
  • Method Details

    • random

      Random random()
    • getSparkClassLoader

      ClassLoader getSparkClassLoader()
    • getContextOrSparkClassLoader

      ClassLoader getContextOrSparkClassLoader()
    • classForName

      <C> Class<C> classForName(String className, boolean initialize, boolean noSparkClassLoader)
      Preferred alternative to Class.forName(className), as well as Class.forName(className, initialize, loader) with current thread's ContextClassLoader.
      className - (undocumented)
      initialize - (undocumented)
      noSparkClassLoader - (undocumented)
    • classIsLoadable

      boolean classIsLoadable(String clazz)
      Determines whether the provided class is loadable in the current thread.
    • isMemberClass

      boolean isMemberClass(Class<?> cls)
      Returns true if and only if the underlying class is a member class.

      Note: jdk8u throws a "Malformed class name" error if a given class is a deeply-nested inner class (See SPARK-34607 for details). This issue has already been fixed in jdk9+, so we can remove this helper method safely if we drop the support of jdk8u.

      cls - (undocumented)