Class

com.fulcrumgenomics.commons.reflect

ReflectiveBuilder

Related Doc: package reflect

Permalink

class ReflectiveBuilder[T] extends AnyRef

Class to manage the process of inspecting another class and it's constructor(s) and then assembling the necessary information to build an instance reflectively.

Three classes work together to manage this process; more functionality can be added but will generally require subclassing 2-3 of these classes:

  1. ReflectiveBuilder extracts constructor and parameter information and manages building the object 2. ArgumentLookup manages the information about arguments, their names etc. 3. Argument contains detailed information on a single argument
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReflectiveBuilder
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ReflectiveBuilder(clazz: Class[T])

    Permalink

Type Members

  1. abstract type ArgumentDescription <: Argument

    Permalink

    A type which can be narrowed in subclasses.

    A type which can be narrowed in subclasses. Roughly equivalent to adding a type parameter to the class.

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to any2stringadd[ReflectiveBuilder[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ReflectiveBuilder[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to ArrowAssoc[ReflectiveBuilder[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. lazy val argumentLookup: ArgumentLookup[ArgumentDescription]

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def build(params: Seq[_]): T

    Permalink

    Constructs a new instance of type T with the parameter values supplied.

  9. def build(): T

    Permalink

    Constructs a new instance of type T with the parameter values set on the builder (including defaults).

  10. def buildArgument(param: scala.reflect.api.JavaUniverse.Symbol, declaringClass: Class[_], index: Int, name: String, defaultValue: Option[Any], argumentType: Class[_], unitType: Class[_], constructableType: Class[_], typeName: String): ArgumentDescription

    Permalink

    Builds an instance of Argument (or sub-class thereof) from the provided values.

    Builds an instance of Argument (or sub-class thereof) from the provided values.

    Attributes
    protected
  11. def buildDefault(): T

    Permalink

    Attempts to build an instance using only default values.

    Attempts to build an instance using only default values. Will fail if any argument does not have a default.

  12. val clazz: Class[T]

    Permalink
  13. val clazzSymbol: scala.reflect.api.JavaUniverse.ClassSymbol

    Permalink
    Attributes
    protected
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. val constructor: scala.reflect.api.JavaUniverse.MethodSymbol

    Permalink
    Attributes
    protected
  16. def ensuring(cond: (ReflectiveBuilder[T]) ⇒ Boolean, msg: ⇒ Any): ReflectiveBuilder[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to Ensuring[ReflectiveBuilder[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: (ReflectiveBuilder[T]) ⇒ Boolean): ReflectiveBuilder[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to Ensuring[ReflectiveBuilder[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: ⇒ Any): ReflectiveBuilder[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to Ensuring[ReflectiveBuilder[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): ReflectiveBuilder[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to Ensuring[ReflectiveBuilder[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def extractParameterInformation(constructor: scala.reflect.api.JavaUniverse.MethodSymbol): Unit

    Permalink

    Extracts information about the parameters to the provided method (a constructor), their types, their concrete implementation classes, etc.

    Extracts information about the parameters to the provided method (a constructor), their types, their concrete implementation classes, etc. Populates the information into the instance level ArgumentLookup object for easy querying.

    constructor

    a method to be examined - for now always a constructor

    Attributes
    protected
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to StringFormat[ReflectiveBuilder[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  25. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  28. val jConstructor: Constructor[_]

    Permalink
    Attributes
    protected
  29. val mirror: Mirror

    Permalink
    Attributes
    protected
  30. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  33. def pickConstructor(constructors: Seq[scala.reflect.api.JavaUniverse.MethodSymbol]): scala.reflect.api.JavaUniverse.MethodSymbol

    Permalink

    Picks the constructor that should be used.

    Picks the constructor that should be used. Can be overridden by child classes. If there is one constructor, return it. Otherwise, if there is a primer constructor return that. Otherwise throw a IllegalArgumentException.

    Attributes
    protected
  34. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  36. val typeSignature: scala.reflect.api.JavaUniverse.Type

    Permalink
    Attributes
    protected
  37. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def [B](y: B): (ReflectiveBuilder[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from ReflectiveBuilder[T] to ArrowAssoc[ReflectiveBuilder[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ReflectiveBuilder[T] to any2stringadd[ReflectiveBuilder[T]]

Inherited by implicit conversion StringFormat from ReflectiveBuilder[T] to StringFormat[ReflectiveBuilder[T]]

Inherited by implicit conversion Ensuring from ReflectiveBuilder[T] to Ensuring[ReflectiveBuilder[T]]

Inherited by implicit conversion ArrowAssoc from ReflectiveBuilder[T] to ArrowAssoc[ReflectiveBuilder[T]]

Ungrouped