org.powerscala.reflect

EnhancedClass

Related Docs: object EnhancedClass | package reflect

class EnhancedClass extends AnyRef

Wraps a Class to provide more powerful functionality.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EnhancedClass
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EnhancedClass(javaClass: Class[_])

    Attributes
    protected[org.powerscala.reflect]

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 caseValue(name: String): Option[CaseValue]

  6. lazy val caseValues: List[CaseValue]

    CaseValue instances representing the arguments if this is a case class.

  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. lazy val companion: Option[EnhancedClass]

    The companion class to this class if it exists.

    The companion class to this class if it exists. If this is the companion class it will return itself.

  9. def computeAllLazy(instance: AnyRef): Unit

  10. lazy val constructors: List[EnhancedConstructor]

    All constructors on this class.

  11. def convertTo[T](name: String, value: Any): T

    Attempts to convert the supplied value to the type of this class.

    Attempts to convert the supplied value to the type of this class.

    T

    the generic type of the return

    value

    the value to convert

    returns

    T

  12. def copy[T](instance: T, args: Map[String, Any] = Map.empty, requireValues: Boolean = false): T

    Reflective copy of a case class with the supplied arguments.

    Reflective copy of a case class with the supplied arguments.

    Note that an empty arguments list may be supplied to create a clone.

  13. lazy val copyConstructor: Option[EnhancedConstructor]

    Retrieves the constructor that matches the copy method.

  14. lazy val copyMethod: Option[EnhancedMethod]

    The method used to create a copy of an instance if this is a case class.

  15. def create[T](args: Map[String, Any]): T

    Reflective invocation of the generated apply method on a companion to this case class.

    Reflective invocation of the generated apply method on a companion to this case class.

    Note that any default arguments may optionally be omitted.

  16. lazy val createMethod: Option[EnhancedMethod]

    Method used to create case class instances or None if this is not a case class.

  17. def defaultForType[T]: T

    Returns the default value by type.

    Returns the default value by type. For primitives this will return zero or false and for references this will return null.

  18. def diff(first: AnyRef, second: AnyRef): List[(CaseValue, Any, Any)]

    Creates a differences list between the two instances supplied.

    Creates a differences list between the two instances supplied. The instances must be of the same type and derived as case classes of this class.

    first

    the first instance to compare

    second

    the second instance to compare

    returns

    List of (CaseValue, First Value, Second Value) for each entry that is different

  19. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def equals(ref: Any): Boolean

    Definition Classes
    EnhancedClass → AnyRef → Any
  21. def fieldByName(name: String): Option[EnhancedField]

    Finds the first field match for the name supplied.

  22. lazy val fields: List[EnhancedField]

  23. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def findCompanionOfType[T](implicit manifest: Manifest[T]): Option[T]

    Iterates up the class hierarchy to find a companion of the specified type.

    Iterates up the class hierarchy to find a companion of the specified type.

    T

    the class of the companion

    manifest

    of type T

    returns

    Option[T]

  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def getDocs: DocumentationReflection

    Attributes
    protected[org.powerscala.reflect]
  27. def hasCompanion[T](implicit manifest: Manifest[T]): Boolean

  28. def hasType(c: Class[_]): Boolean

    Returns true if c is extended or mixed in to this EnhancedClass.

    Returns true if c is extended or mixed in to this EnhancedClass.

  29. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  30. lazy val instance: Option[AnyRef]

    Singleton instance on the associated companion object.

    Singleton instance on the associated companion object. This can be called on the object or class to get the instance for the companion object.

  31. def isCase: Boolean

    True if this is a case class

  32. def isCastable(v: Any): Boolean

    Returns true if v is castable to this class type.

    Returns true if v is castable to this class type.

  33. lazy val isCompanion: Boolean

    True if this is a companion object.

  34. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  35. def isPrimitive: Boolean

    True if this is a primitive value

  36. def isTransient: Boolean

    True if this is a transient class

  37. val javaClass: Class[_]

  38. def method(name: String, args: List[(String, EnhancedClass)]): Option[EnhancedMethod]

    Finds a method from the supplied name and argument names and types.

  39. def method(name: String, args: EnhancedClass*): Option[EnhancedMethod]

    Finds a method from the supplied name and args.

  40. def methodByArgs(name: String, args: List[(String, Any)]): Option[EnhancedMethod]

    Finds a method from the supplied name and argument names and values.

  41. def methodByName(name: String): Option[EnhancedMethod]

    Finds the first method match for the name supplied.

  42. def methodBySignature(signature: String): Option[EnhancedMethod]

    Finds a method by the absoluteSignature.

  43. lazy val methods: List[EnhancedMethod]

    All methods on this class.

  44. final def modify[T](instance: T, name: String, value: Any): T

    Utilizes case classes to copy the hierarchical value and return a new instance of the case class with the new value.

    Utilizes case classes to copy the hierarchical value and return a new instance of the case class with the new value.

    T

    the copied instance with the new value

    instance

    the instance to copy

    name

    the dot-separated hierarchical field structure.

    value

    the new value to set

    returns

    copied instance T

  45. lazy val name: String

    The name of the class.

  46. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  47. lazy val nonCompanion: EnhancedClass

  48. final def notify(): Unit

    Definition Classes
    AnyRef
  49. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  50. lazy val parents: List[Class[_]]

    Determines all super class and interfaces for this class and returns them in an ordered list working backwards from this class up the tree.

  51. lazy val parentsSet: Set[Class[_]]

  52. lazy val simpleName: String

  53. lazy val subTypes: List[EnhancedClass]

    All classes that are subtypes of this class in the runtime.

    All classes that are subtypes of this class in the runtime. Not an inexpensive operation.

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

    Definition Classes
    AnyRef
  55. def toString(): String

    Definition Classes
    EnhancedClass → AnyRef → Any
  56. final def value[T](instance: AnyRef, name: String): T

    Utilizes case classes to derive the value of the field defined by 'name' on the given 'instance'.

    Utilizes case classes to derive the value of the field defined by 'name' on the given 'instance'.

    T

    the return type

    instance

    the instance for this class

    name

    the dot-separated hierarchical field structure.

    returns

    T or NPE

    Annotations
    @tailrec()
  57. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped