Trait/Object

org.zalando.grafter

Rewriter

Related Docs: object Rewriter | package grafter

Permalink

trait Rewriter extends AnyRef

Functions for rewriting parts of an object graph representing services or configuration with different implementations.

This is used for "Dependency Injection" to replace some service implementations with other implementations.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Rewriter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  12. def modify[G, T](f: (T) ⇒ T, graph: G)(implicit arg0: ClassTag[T]): G

    Permalink

    Modify with a given function

  13. def modifyWith[G, T](f: PartialFunction[T, T], graph: G)(implicit arg0: ClassTag[T]): G

    Permalink

    Modify with a given Partial function

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def replace[S, G](s: S, graph: G)(implicit arg0: ClassTag[S]): G

    Permalink

    Replace all values of type S with the same value

  18. def replaceFirst[S, G](s: S, graph: G)(implicit arg0: ClassTag[S]): G

    Permalink

    Replace the first value of type S (topdown, with another value

  19. def replaceStrategy[S](s: S)(implicit arg0: ClassTag[S]): Strategy

    Permalink
  20. def replaceWith[G, T](s: PartialFunction[T, Option[T]], graph: G): G

    Permalink

    Replace with a given partial function

  21. def replacedWith[S, G](s: S, graph: G)(implicit arg0: ClassTag[S]): Option[G]

    Permalink

    Replace all values of type S with the same value, returning None if nothing was replaced, or the rewritten graph otherwise.

  22. def rewriteFirstWithStrategy[G](strategy: Strategy, graph: G): G

    Permalink

    Replace with a given strategy (breadth first)

  23. def rewriteWithStrategy[G](strategy: Strategy, graph: G): G

    Permalink

    Replace with a given strategy (top down)

  24. def singleton[S, G](graph: G)(implicit arg0: ClassTag[S]): G

    Permalink

    Take the first value of a given type (approximated with a ClassTag) and replace it everywhere in the graph

  25. def singletonStrategy[S](implicit tag: ClassTag[S]): Strategy

    Permalink
  26. def singletons[G](predicate: (Any) ⇒ Boolean)(graph: G): G

    Permalink

    Make singletons of all components, except the ones not accepted by the predicate

  27. def singletons[G](graph: G): G

    Permalink

    Make singletons of all components

  28. def singletonsBy[G](by: PartialFunction[Any, Any], bys: PartialFunction[Any, Any]*)(graph: G): G

    Permalink

    Make singletons of all components, based on the class name of the component by default and on the class name + the result of the by function

  29. def singletonsByStrategy(by: PartialFunction[Any, Any], bys: PartialFunction[Any, Any]*): Strategy

    Permalink
  30. def startAll[G](graph: G): Eval[List[StartResult]]

    Permalink

    start components from the bottom up

  31. def stopAll[G](graph: G): Eval[List[StopResult]]

    Permalink

    stop components from the top down we try to stop components even if previous components fail to stop

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  34. def topBreadthfirst(s: Strategy): Strategy

    Permalink
  35. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped