Class SharedCodeProperty

java.lang.Object
org.praxislive.code.SharedCodeProperty
All Implemented Interfaces:
Control

public class SharedCodeProperty extends Object implements Control
A property control for shared code classes. A SharedCodeProperty can be added to a container (eg. Root). The SharedCodeContext should be added to the container's lookup where it can be found and used by contained code components.
  • Field Details

  • Constructor Details

    • SharedCodeProperty

      public SharedCodeProperty(Lookup.Provider lookupContext, Consumer<LogBuilder> logHandler)
      Create a shared code property.
      Parameters:
      lookupContext - lookup provider, eg. the container
      logHandler - a consumer for logs
  • Method Details

    • call

      public void call(Call call, PacketRouter router) throws Exception
      Specified by:
      call in interface Control
      Throws:
      Exception
    • getSharedCodeContext

      public SharedCodeContext getSharedCodeContext()
      The shared code context, which should be added to the container's lookup.
      Returns:
      shared code context
    • getValue

      public PMap getValue()
      Access the current value as a map.
      Returns:
      current value