Details

    • Sub-task
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 6.0.1, 5.0.8
    • parser
    • None

    Description

      A lot of our logic is implemented in terms of searching effective statements, mostly through StmtContextUtils methods. These go back way to Java 7 and those early days. We currently have Java 11 and possibility of default methods – and since these two reside in the same package the natural thing is to migrate over.

      Optional<Boolean> findFirstSubstatementArgument(ConfigurationEffectiveStatement.class);

      is what YANGTOOLS-783 is all about, I think.

      This is a question InferredStatementContext can answer without materializing its substatements – at least for non-SchemaTreeEffectiveStatements we can just forward to prototype. For SchemaTreeEffectiveStatements we do a our->prototype namespace translation (the prototype knows its namespace) and again defer to prototype.

      Let us also define a:

      StmtContext.hasSubstatement(Class<? extends EffectiveStatement>)

      Methods which need to use this method are:

      StmtContextUtils.containsPresenceSubStmt()
      StmtContextUtil.hasAncestorOfTypeWithChildOfType()
      AbstractAugmentStatementSupport.hasWhenSubstatement()
       

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            miro.kovac Miroslav Kovac
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: