Interface ReferenceFactory

  • All Known Implementing Classes:
    StubReferenceFactory

    public interface ReferenceFactory
    PROVISIONAL API Replaces SReferenceHandler. Shall decide whether is specific to Java/BL or could be generified
    Since:
    3.3
    • Method Detail

      • create

        @NotNull
        SReference create​(SNode source,
                          String pack,
                          SNodeId targetNodeId,
                          SReferenceLink role,
                          String resolveInfo,
                          SNodeId targetTopClassifier)
        For a given package name and id of target classifier(?), build a model reference (tailored for the given role in the source node)
        Parameters:
        source - origin of the link
        pack - name of Java package
        targetNodeId - identifies classifier(?) we look up
        role - role of the link to populate
        resolveInfo - additional information that descripes the link
        targetTopClassifier - id of root classifier that holds target node (may be the same as targetNodeId). Hint value to pick best possible package and not to force complete model load. Since we load stub models in two steps, with roots available first, check for top classifier through SModel.getNode(SNodeId) doesn't trigger complete load.
        Returns:
        reference to add, never null