Interface Context


  • public interface Context
    A decoration Context is a way to provide the decorator(s) all of the available information about the instance to decorate.
    • Method Detail

      • getName

        Name getName()
        Returns the name of the heap object being decorated.
        Returns:
        the name of the heap object being decorated.
      • getConfig

        JsonValue getConfig()
        Returns the heap object being decorated configuration. Should be considered as a read-only view of the configuration (does not trigger any reconfiguration).
        Returns:
        the heap object being decorated configuration.
      • getHeap

        Heap getHeap()
        Returns the heap that spawned the decorated heap object. This permits decorators to borrow references just like any component. Notice that this reference has to be used with caution because any attempt to resolve a reference in a decorator that is globally declared for a heap will produce an infinite recursion leading to a java.lang.StackOverflowError. In order to prevent that, decorator's implementer are encouraged to use a LazyReference that will load the reference lazily (ideally just before it is really needed, but not during the loading of the heap).
        Returns:
        the heap that spawned the decorated heap object.
        See Also:
        LazyReference