Packages

trait ClassHelpers extends AnyRef

ClassHelpers provide several functions to instantiate a Class object given the class name and one or more package names

Self Type
ControlHelpers
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClassHelpers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. def ^[T](i: T*): List[T]

    This operator transforms its arguments into a List

    This operator transforms its arguments into a List

    returns

    the list of arguments passed as varargs

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def callableMethod_?(meth: Method): Boolean

    returns

    true if the method is public and has no parameters

  7. def classHasControllerMethod(clz: Class[_], name: String): Boolean

    Check that the method 'name' is callable for class 'clz'

    Check that the method 'name' is callable for class 'clz'

    clz

    the class supposed to own the method

    name

    name of the method to test

    returns

    true if the method exists on the class and is callable

  8. def classHierarchy(in: Class[_]): List[Class[_]]
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def containsClass[C](clz: Class[C], toMatch: List[Class[_]]): Boolean

    Is the clz an instance of (assignable from) any of the classes in the list

    Is the clz an instance of (assignable from) any of the classes in the list

    clz

    the class to test

    toMatch

    the list of classes to match against

    returns

    true if clz is assignable from any of the matching classes

  11. def createInvoker[C <: AnyRef](name: String, on: C): Box[() ⇒ Box[Any]]

    Create a function (the 'invoker') which will trigger any public, parameterless method That function will throw the cause exception if the method can't be invoked

    Create a function (the 'invoker') which will trigger any public, parameterless method That function will throw the cause exception if the method can't be invoked

    on

    instance whose method must be invoked

    returns

    Empty if instance is null or Full(invoker)

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def findClass(where: List[(String, List[String])]): Box[Class[AnyRef]]

    Find a class given a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    Find a class given a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    returns

    a Box, either containing the found class or an Empty can.

  16. def findClass(name: String, where: List[String]): Box[Class[AnyRef]]

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    returns

    a Box, either containing the found class or an Empty can.

  17. def findClass[C <: AnyRef](name: String, where: List[String], targetType: Class[C]): Box[Class[C]]

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    returns

    a Box, either containing the found class or an Empty can.

  18. def findClass(name: String, where: List[String], modifiers: List[(String) ⇒ String]): Box[Class[AnyRef]]

    General method to in find a class according to its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    General method to in find a class according to its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    returns

    a Box, either containing the found class or an Empty can.

  19. def findClass[C <: AnyRef](name: String, where: List[String], modifiers: List[(String) ⇒ String], targetType: Class[C]): Box[Class[C]]

    General method to in find a class according to its name, a list of possible packages, a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    General method to in find a class according to its name, a list of possible packages, a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    returns

    a Box, either containing the found class or an Empty can.

  20. def findType[C <: AnyRef](where: List[(String, List[String])])(implicit m: Manifest[C]): Box[Class[C]]

    Find a class given its type, a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    Find a class given its type, a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    returns

    a Box, either containing the found class or an Empty can.

  21. def findType[C <: AnyRef](name: String, where: List[String])(implicit m: Manifest[C]): Box[Class[C]]

    Find a class given its type, its name and a list of packages, turning underscored names to CamelCase if necessary.

    Find a class given its type, its name and a list of packages, turning underscored names to CamelCase if necessary.

    returns

    a Box, either containing the found class or an Empty can.

  22. def findType[C <: AnyRef](name: String, where: List[String], modifiers: List[(String) ⇒ String])(implicit m: Manifest[C]): Box[Class[C]]

    General method to in find a class according to its type, its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    General method to in find a class according to its type, its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    returns

    a Box, either containing the found class or an Empty can.

  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  25. def instantiate[C](clz: Class[C]): Box[C]

    Create a new instance of a class

    Create a new instance of a class

    returns

    a Full can with the instance or a Failure if the instance can't be created

  26. def invokeControllerMethod(clz: Class[_], meth: String): Any

    Invoke a controller method (parameterless, public) on a class

    Invoke a controller method (parameterless, public) on a class

    clz

    the class owning the method

    returns

    the result of the method invocation or throws the root exception causing an error

  27. def invokeMethod[C](clz: Class[C], inst: AnyRef, meth: String, params: Array[AnyRef], ptypes: Array[Class[_]]): Box[Any]

    Invoke the given method for the given class, with some parameters and their types Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used

    Invoke the given method for the given class, with some parameters and their types Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used

    clz

    class whose method should be invoked

    inst

    instance of the class who method should be invoked, if the method is not static

    meth

    method to invoke

    params

    parameters to pass to the method

    ptypes

    list of types of the parameters

    returns

    a Box containing the value returned by the method

  28. def invokeMethod[C](clz: Class[C], inst: AnyRef, meth: String, params: Array[AnyRef]): Box[Any]

    Invoke the given method for the given class, with some parameters.

    Invoke the given method for the given class, with some parameters. Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used

    clz

    class whose method should be invoked

    inst

    instance of the class who method should be invoked, if the method is not static

    meth

    method to invoke

    params

    parameters to pass to the method

    returns

    a Box containing the value returned by the method

  29. def invokeMethod[C](clz: Class[C], inst: AnyRef, meth: String): Box[Any]

    Invoke the given method for the given class, with no params.

    Invoke the given method for the given class, with no params. The class is not instanciated if the method is static, otherwise the passed instance is used

    clz

    class whose method should be invoked

    inst

    instance of the class who method should be invoked, if the method is not static

    meth

    method to invoke

    returns

    a Box containing the value returned by the method

  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped