Class SReference

    • Field Detail

      • EMPTY_ARRAY

        public static final SReference[] EMPTY_ARRAY
      • mySourceNode

        protected final SNode mySourceNode
    • Constructor Detail

      • SReference

        @Deprecated
        protected SReference​(String role,
                             SNode sourceNode)
        Deprecated.
        role must be "genuine", interned
    • Method Detail

      • disableLogging

        public static boolean disableLogging()
        Returns:
        Whether logging was really disabled by this call, i.e. it wasn't already disabled before
      • enableLogging

        public static void enableLogging()
      • getTargetNodeSilently

        public static SNode getTargetNodeSilently​(SReference ref)
      • getLink

        public SReferenceLink getLink()
        Description copied from interface: SReference
        Gets the associated Link - an abstract meta-definition for the reference
        Specified by:
        getLink in interface SReference
      • getTargetNode

        public final SNode getTargetNode()
        Description copied from interface: SReference
        Resolves the target node in the containing repository. This operation is not guaranteed to be fast. It may require to traverse the repository, compute types for some nodes or execute code provided by the language-designer.
        Specified by:
        getTargetNode in interface SReference
        Returns:
        the node behind the reference, or null if something is broken in the repository
      • getTargetNodeReference

        public SNodeReference getTargetNodeReference()
        Description copied from interface: SReference
        Builds and returns a reference to the target node. Tries to avoid lengthy computations whenever possible. Does exactly the same as getTargetNode().getReference(), but probably faster.
        Specified by:
        getTargetNodeReference in interface SReference
      • getTargetSModelReference

        @Nullable
        public abstract SModelReference getTargetSModelReference()
        Description copied from interface: SReference
        The following two operations are defined only for references which can instantly respond to the request (e.g. they store the target model reference and/or node id as a part of the reference).
        Specified by:
        getTargetSModelReference in interface SReference
        Returns:
        target model reference (if available)
      • makeDirect

        public void makeDirect()
      • makeIndirect

        public boolean makeIndirect()
      • getResolveInfo

        public String getResolveInfo()
      • setResolveInfo

        public void setResolveInfo​(String info)
      • getTargetNode_internal

        protected abstract SNode getTargetNode_internal()
      • error

        protected final void error​(String message,
                                   boolean onlyWarn,
                                   SReference.ProblemDescription... problems)
        prints error to log
        Parameters:
        onlyWarn - if true then warning must be printed out. Must be true almost always.