Class 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 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 to
        previous - 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.