Class KStringHolder.TagReference<TARGET>

    • Method Detail

      • onReferenceEvent

        public void onReferenceEvent​(PropReference ref,
                                     IPropReference.ReferenceChangeEvent event,
                                     GEvent triggerEvent)
        Called when a property reference event occurs. The events are ReferenceChangeEvent.FOUND, FOUND_WRONG_CLASS, RENAMED, MOVED, NEW_PROPERTY, BROKEN.

        Trigger GEvent's are: PROP_RENAMED, PROP_CNR_RENAMED or PROP_PROJECT_RENAMED for "RENAMED", PROP_DISPOSED for DISPOSED. The PROP_RESOLVE_REFERENCES can sometimes cause the trigger event to be set.

        Specified by:
        onReferenceEvent in interface IPropReference
        Parameters:
        ref - The property reference object.
        event - The event.
        triggerEvent - The event that triggered this reference event, null for none.
      • isReferenceValid

        public boolean isReferenceValid​(GProp<?> property)
        Validates the property reference that has been looked up.
        Specified by:
        isReferenceValid in interface IPropReference
        Parameters:
        property - The property to validate.
        Returns:
        true if valid, false otherwise.
      • getReferenceDescription

        public java.lang.String getReferenceDescription()
        Gets a short description of this reference, e.g. "VirtualSpace" or "Label For".
        Specified by:
        getReferenceDescription in interface IPropReference
        Returns:
        The reference description string.
      • isValid

        public boolean isValid()
        Checks if the resolving of the reference is valid with the automatic resolving mechanism.
        Returns:
        true if the reference is valid, false otherwise.
      • getTargetReference

        public TARGET getTargetReference()
        Gets the target reference also trying to resolve the reference, i.e. using automatic resolving mechanism.
        Returns:
        The target reference instance, or null if not found.
      • onEvent

        public void onEvent​(GEvent event)
        Called to process an event.
        Specified by:
        onEvent in interface EventListener
        Parameters:
        event - The event.