Class

razie.xp

MyBeanSolver

Related Doc: package xp

Permalink

class MyBeanSolver extends XpSolver[Any]

reflection implementation

Linear Supertypes
XpSolver[Any], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MyBeanSolver
  2. XpSolver
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MyBeanSolver(excludeMatches: List[(String) ⇒ Boolean] = Nil)

    Permalink

    excludeMatches

    - custom exclusion rules: nodes and attributes with these names won't be browsed

Type Members

  1. abstract class BeanWrapper extends LazyB

    Permalink
  2. type CONT = (String, String) ⇒ List[BeanWrapper]

    Permalink
  3. case class FieldWrapper(j: Any, f: Field, label: String = "root") extends BeanWrapper with LazyB with Product with Serializable

    Permalink
  4. trait LazyB extends AnyRef

    Permalink
  5. case class MethodWrapper(j: Any, m: Method, label: String = "root") extends BeanWrapper with LazyB with Product with Serializable

    Permalink
  6. case class RootWrapper(j: Any, label: String = "root") extends BeanWrapper with LazyB with Product with Serializable

    Permalink
  7. type T = Any

    Permalink
  8. type U = (String, String) ⇒ List[BeanWrapper]

    Permalink

    type U stands for the continuation that following methods pass to themselves.

    type U stands for the continuation that following methods pass to themselves.

    Ideally it's just a closure that can implement getNext(curr: (T, U), tag: String, assoc: String): Iterable[(T, U)]

    So options include

    type U = List[MyWrapper] and type U = PartialFunction[(String, String), List[MyWrapper]] // basically getNext (tag, assoc)

    The continuation is very good when getting the kids is expensive, like a DB query, eh?

    Definition Classes
    MyBeanSolverXpSolver

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. def WrapF(j: Any, f: Field, label: String): FieldWrapper

    Permalink
  5. def WrapM(j: Any, m: Method, label: String): MethodWrapper

    Permalink
  6. def WrapO(j: Any, label: String = "root"): RootWrapper

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def children(root: T, xe: Option[XpElement]): (T, U)

    Permalink

    prepare to start from a node, figure out the continuations.

    prepare to start from a node, figure out the continuations.

    This is only used to start, from the root - then getNext is used

    You can return an actual list of nodes or a callback that you then call from getNext to get the actuals

    root

    the node we'll start resolving from

    xe

    - optional the current path element - you can use cond to filter result set directly when querying

    Definition Classes
    MyBeanSolverXpSolver
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. val excludeMatches: List[(String) ⇒ Boolean]

    Permalink

    - custom exclusion rules: nodes and attributes with these names won't be browsed

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def getAttr(o: T, attr: String): String

    Permalink

    get the value of an attribute from the given node

    get the value of an attribute from the given node

    returns

    the value, toString, of the attribute

    Definition Classes
    MyBeanSolverXpSolver
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def getNext(o: (T, U), tag: String, assoc: String, xe: Option[XpElement]): List[(T, U)]

    Permalink

    get the next list of nodes at the current position in the path.

    get the next list of nodes at the current position in the path. For each, return a tuple with the respective value and the REST to continue solving

    You can return an actual list of nodes or a callback that you then call from getNext to get the actuals

    xe

    - optional the current path element - you can use cond to filter result set directly when querying

    Definition Classes
    MyBeanSolverXpSolver
  17. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  19. lazy val meth: Map[String, String]

    Permalink
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. val nogo: List[Any]

    Permalink
  22. val nomatch: List[(String) ⇒ Boolean]

    Permalink
  23. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  25. def reduce(curr: Iterable[(T, U)], xe: XpElement): Iterable[(T, U)]

    Permalink

    reduce the current set of possible nodes based on the given condition.

    reduce the current set of possible nodes based on the given condition. Note that the condition may be null - this is still called to give you a chance to cleanup?

    This default implementation may be ok for most resolvers

    NOTE - if you choose to filter in getNext, then you don't have to filter here...

    curr

    the list of (currelement, continuation) to reduce

    Definition Classes
    MyBeanSolverXpSolver
  26. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. def unwrap(root: List[T]): List[T]

    Permalink

    finally unwrap whatever and serve plain objects

    finally unwrap whatever and serve plain objects

    root

    the node we'll start resolving from

    Definition Classes
    MyBeanSolverXpSolver
  29. final def wait(): Unit

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

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

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

Inherited from XpSolver[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped