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.
  • 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
    • getAddControl

      public Control getAddControl()
      Get the add control linked to this property. See
      invalid reference
      #ADD_INFO
      .
      Returns:
      add control
    • getMergeControl

      public Control getMergeControl()
      Get the merge control linked to this property. See
      invalid reference
      #MERGE_INFO
      .
      Returns:
      merge control
    • 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