Packages

object ScalaReflection extends ScalaReflection

A default version of ScalaReflection that uses the runtime universe.

Linear Supertypes
ScalaReflection, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaReflection
  2. ScalaReflection
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Schema(dataType: DataType, nullable: Boolean) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def cleanUpReflectionObjects[T](func: ⇒ T): T

    Any codes calling scala.reflect.api.Types.TypeApi.<:< should be wrapped by this method to clean up the Scala reflection garbage automatically.

    Any codes calling scala.reflect.api.Types.TypeApi.<:< should be wrapped by this method to clean up the Scala reflection garbage automatically. Otherwise, it will leak some objects to scala.reflect.runtime.JavaUniverse.undoLog.

    Definition Classes
    ScalaReflection
    See also

    https://github.com/scala/bug/issues/8302

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def constructParams(tpe: scala.reflect.api.JavaUniverse.Type): Seq[scala.reflect.api.JavaUniverse.Symbol]
    Attributes
    protected
    Definition Classes
    ScalaReflection
  8. def definedByConstructorParams(tpe: scala.reflect.api.JavaUniverse.Type): Boolean

    Whether the fields of the given type is defined entirely by its constructor parameters.

  9. def encodeFieldNameToIdentifier(fieldName: String): String
  10. def encoderFor(tpe: scala.reflect.api.JavaUniverse.Type, isRowEncoderSupported: Boolean = false): AgnosticEncoder[_]

    Create an AgnosticEncoder for a Type.

  11. def encoderFor[E](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[E]): AgnosticEncoder[E]

    Create an AgnosticEncoder from a TypeTag.

    Create an AgnosticEncoder from a TypeTag.

    If the given type is not supported, i.e. there is no encoder can be built for this type, an SparkUnsupportedOperationException will be thrown with detailed error message to explain the type path walked so far and which class we are not supporting. There are 4 kinds of type path: * the root type: root class: "abc.xyz.MyClass" * the value type of Option: option value class: "abc.xyz.MyClass" * the element type of Array or Seq: array element class: "abc.xyz.MyClass" * the field of Product: field (class: "abc.xyz.MyClass", name: "myField")

  12. def encoderForWithRowEncoderSupport[E](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[E]): AgnosticEncoder[E]

    Same as encoderFor but with extended support to return UnboundRowEncoder for Row type.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def findConstructor[T](cls: Class[T], paramTypes: Seq[Class[_]]): Option[(Seq[AnyRef]) ⇒ T]

    Finds an accessible constructor with compatible parameters.

    Finds an accessible constructor with compatible parameters. This is a more flexible search than the exact matching algorithm in Class.getConstructor. The first assignment-compatible matching constructor is returned if it exists. Otherwise, we check for additional compatible constructors defined in the companion object as apply methods. Otherwise, it returns None.

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def getClassFromType(tpe: scala.reflect.api.JavaUniverse.Type): Class[_]
  19. def getClassNameFromType(tpe: scala.reflect.api.JavaUniverse.Type): String

    Returns the full class name for a type.

    Returns the full class name for a type. The returned name is the canonical Scala name, where each component is separated by a period. It is NOT the Java-equivalent runtime name (no dollar signs).

    In simple cases, both the Scala and Java names are the same, however when Scala generates constructs that do not map to a Java equivalent, such as singleton objects or nested classes in package objects, it uses the dollar sign ($) to create synthetic classes, emulating behaviour in Java bytecode.

  20. def getConstructorParameterNames(cls: Class[_]): Seq[String]

    Returns the parameter names for the primary constructor of this class.

    Returns the parameter names for the primary constructor of this class.

    Logically we should call getConstructorParameters and throw away the parameter types to get parameter names, however there are some weird scala reflection problems and this method is a workaround to avoid getting parameter types.

  21. def getConstructorParameters(tpe: scala.reflect.api.JavaUniverse.Type): Seq[(String, scala.reflect.api.JavaUniverse.Type)]

    Returns the parameter names and types for the primary constructor of this type.

    Returns the parameter names and types for the primary constructor of this type.

    Note that it only works for scala classes with primary constructor, and currently doesn't support inner class.

    Definition Classes
    ScalaReflection
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  24. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  27. def localTypeOf[T](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): scala.reflect.api.JavaUniverse.Type

    Return the Scala Type for T in the current classloader mirror.

    Return the Scala Type for T in the current classloader mirror.

    Use this method instead of the convenience method universe.typeOf, which assumes that all types can be found in the classloader that loaded scala-reflect classes. That's not necessarily the case when running using Eclipse launchers or even Sbt console or test (without fork := true).

    Definition Classes
    ScalaReflection
    See also

    SPARK-5281

  28. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  29. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  36. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. def mirror: Mirror

    The mirror used to access types in the universe

    The mirror used to access types in the universe

    Definition Classes
    ScalaReflectionScalaReflection
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. def schemaFor(tpe: scala.reflect.api.JavaUniverse.Type): Schema

    Returns a catalyst DataType and its nullability for the given Scala Type using reflection.

  45. def schemaFor[T](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Schema

    Returns a catalyst DataType and its nullability for the given Scala Type using reflection.

  46. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  47. def toString(): String
    Definition Classes
    AnyRef → Any
  48. val universe: scala.reflect.runtime.universe.type

    The universe we work in (runtime or macro)

    The universe we work in (runtime or macro)

    Definition Classes
    ScalaReflectionScalaReflection
  49. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from ScalaReflection

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped