java.lang.Object
org.praxislive.code.SharedCodeProtocol
- All Implemented Interfaces:
Protocol
Protocol for a container that provides shared code that can be used by code
in child components. The
shared-code property wraps a map of full
class names to Java source code. The shared-code-add and
shared-code-merge functions allow for updating the property with a
partial map.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.praxislive.core.Protocol
Protocol.Type<T extends Protocol>, Protocol.TypeProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComponentInfostatic final StringStandard control ID for shared code property.static final StringStandard control ID for shared code add function.static final ControlInfoControl info for the shared code add control.static final ControlInfoControl info for the shared code property control.static final StringStandard control ID for shared code merge function.static final ControlInfoControl info for the shared code merge control. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontrols()The names of the controls that a component advertising this protocol must provide.getControlInfo(String control) Query the ControlInfo for the provided control name on this protocol.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.praxislive.core.Protocol
optionalControls
-
Field Details
-
SHARED_CODE
Standard control ID for shared code property.- See Also:
-
SHARED_CODE_ADD
Standard control ID for shared code add function.- See Also:
-
SHARED_CODE_MERGE
Standard control ID for shared code merge function.- See Also:
-
SHARED_CODE_INFO
Control info for the shared code property control. -
SHARED_CODE_ADD_INFO
Control info for the shared code add control. The input map is merged with the existing shared code using the rules ofPMap.IF_ABSENT. -
SHARED_CODE_MERGE_INFO
Control info for the shared code merge control. The input map is merged with the existing shared code using the rules ofPMap.REPLACE. -
API_INFO
-
-
Constructor Details
-
SharedCodeProtocol
public SharedCodeProtocol()
-
-
Method Details
-
controls
Description copied from interface:ProtocolThe names of the controls that a component advertising this protocol must provide. -
getControlInfo
Description copied from interface:ProtocolQuery the ControlInfo for the provided control name on this protocol. The component implementing this protocol will generally use the control info provided here inside its component info. In exceptional circumstances, the component may extend or adapt the behaviour of the control, as long as it is fully compatible with this control info and the specification.- Specified by:
getControlInfoin interfaceProtocol- Parameters:
control- name of control- Returns:
- control info for named control
-