- java.lang.Object
-
- org.praxislive.code.ReferenceDescriptor
-
public abstract class ReferenceDescriptor extends Object
A ReferenceDescriptor is used for wrapping references carried across from one iteration of code context to the next that do not correspond to controls or ports. They include an ID, but no ordering or categories.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReferenceDescriptor(String id)
Create a ReferenceDescriptor with the provided ID.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
attach(CodeContext<?> context, ReferenceDescriptor previous)
Configure the reference for the provided context during attachment.void
dispose()
Hook called on code context disposal for any references descriptor not carried over.String
getID()
Get the ID.void
reset(boolean full)
Hook called to reset during attachment / detachment, or execution context state changes.
-
-
-
Constructor Detail
-
ReferenceDescriptor
protected ReferenceDescriptor(String id)
Create a ReferenceDescriptor with the provided ID.- Parameters:
id
- reference id
-
-
Method Detail
-
getID
public final String getID()
Get the ID.- Returns:
- id
-
attach
public abstract void attach(CodeContext<?> context, ReferenceDescriptor previous)
Configure the reference for the provided context during attachment. The previous reference descriptor with the same ID is provided - it may be null or of a different type. This method should handle disposal of the previous reference descriptor in cases where necessary (eg. not same type).- Parameters:
context
- context being attached toprevious
- previous reference descriptor with same ID, may be null or different type
-
reset
public void reset(boolean full)
Hook called to reset during attachment / detachment, or execution context state changes. Full reset happens on execution context changes.- Parameters:
full
- true if execution context state
-
dispose
public void dispose()
Hook called on code context disposal for any references descriptor not carried over.
-
-