Object

play.utils

Reflect

Related Doc: package utils

Permalink

object Reflect

Source
Reflect.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Reflect
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class SubClassOf[T] extends AnyRef

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object SubClassOf

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def bindingsFromConfiguration[ScalaTrait, JavaInterface, JavaAdapter <: ScalaTrait, JavaDelegate <: JavaInterface, Default <: ScalaTrait](environment: api.Environment, config: api.Configuration, key: String, defaultClassName: String)(implicit scalaTrait: SubClassOf[ScalaTrait], javaInterface: SubClassOf[JavaInterface], javaAdapter: ClassTag[JavaAdapter], javaDelegate: ClassTag[JavaDelegate], default: ClassTag[Default]): Seq[Binding[_]]

    Permalink

    Lookup the given key from the given configuration, and provide bindings for the ScalaTrait to a class by that key.

    Lookup the given key from the given configuration, and provide bindings for the ScalaTrait to a class by that key.

    The end goal is to provide a binding for ScalaTrait. The logic for finding the implementation goes like this:

    - If the value of the configured key is provided, this indicates the user will provide their own binding, so return nothing. - If the value of the configured key is a class that exists, then use that - If the value of the configured key is not a class that exists, fail - Otherwise if no configuration value is found for key, then if there is a class found with name defaultClassName, use that - Otherwise, use the class Default

    If a class has been located, convert that to a binding, by the following rules:

    - If it's a subclass of ScalaTrait bind it directly - Otherwise, if it's a subclass of JavaInterface, bind that to JavaInterface, and then also return a binding of JavaAdapter to ScalaTrait - Otherwise, fail

    ScalaTrait

    The trait to bind

    JavaInterface

    The Java interface for Java versions of the implementation

    JavaAdapter

    An adapter class that depends on JavaInterface and provides ScalaTrait

    JavaDelegate

    An implementation of JavaInterface that delegates to ScalaTrait, for when the configured class is not an instance of JavaInterface.

    Default

    The default implementation of ScalaTrait if no user implementation has been provided

    environment

    The environment to load classes from

    config

    The configuration

    key

    The key to look up the classname from the configuration

    returns

    Zero or more bindings to provide ScalaTrait

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def configuredClass[ScalaTrait, JavaInterface, Default <: ScalaTrait](environment: api.Environment, config: api.Configuration, key: String, defaultClassName: String)(implicit scalaTrait: SubClassOf[ScalaTrait], javaInterface: SubClassOf[JavaInterface], default: ClassTag[Default]): Option[Either[Class[_ <: ScalaTrait], Class[_ <: JavaInterface]]]

    Permalink

    Lookup the given key from the given configuration, and load it either as an instance of ScalaTrait, or JavaInterface.

    Lookup the given key from the given configuration, and load it either as an instance of ScalaTrait, or JavaInterface.

    If no user provided class can be found, then return Default.

    - If the value of the configured key is provided, this indicates the user will provide their own binding, so return None. - If the value of the configured key is a class that exists, then use that - If the value of the configured key is not a class that exists, fail - Otherwise if no configuration value is found for key, then if there is a class found with name defaultClassName, use that - Otherwise, use the class Default

    If a class has been located, then return Some, according to the following rules:

    - If it's a subclass of ScalaTrait return that as Left - Otherwise, if it's a subclass of JavaInterface, return that as Right - Otherwise, fail

    ScalaTrait

    The Scala trait to return

    JavaInterface

    The Java interface for Java versions of the implementation

    Default

    The default implementation of ScalaTrait if no user implementation has been provided

    environment

    The environment to load classes from

    config

    The configuration

    key

    The key to look up the classname from the configuration

  9. def createInstance[T](clazz: Class[_])(implicit arg0: ClassTag[T]): T

    Permalink
  10. def createInstance[T](fqcn: String, classLoader: ClassLoader)(implicit arg0: ClassTag[T]): T

    Permalink
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def getClass[T](fqcn: String, classLoader: ClassLoader)(implicit arg0: ClassTag[T]): Class[_ <: T]

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def simpleName(clazz: Class[_]): String

    Permalink
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped