Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: Java API
    • Labels:
      None
    • Number of attachments :
      0

      Activity

      Aslak Hellesøy made changes -
      Field Original Value New Value
      Affects Version/s 1.3 [ 10107 ]
      Fix Version/s 1.3 [ 10107 ]
      Hide
      Aslak Hellesøy added a comment -

      There are two parts of the validation.

      1) Warn/barf when an unknown tag (like @plop) is encountered. This logic can and should be part of a DocletTagFactory implementation. The createDocletTag(String,String) method could barf.

      2) Let the tag validate itself. This requires a validate() method on the DefaultDocletTag, because it should be called by QDox.

      Show
      Aslak Hellesøy added a comment - There are two parts of the validation. 1) Warn/barf when an unknown tag (like @plop) is encountered. This logic can and should be part of a DocletTagFactory implementation. The createDocletTag(String,String) method could barf. 2) Let the tag validate itself. This requires a validate() method on the DefaultDocletTag, because it should be called by QDox.
      Hide
      Peter Donald added a comment -

      Maybe there is another way. I consider parsing/model building one concern and validation of the model another concern. So maybe validation could be a second pass after the model is built.

      So instead of doing validation in places like createDocletTag() you instead build the model up as is done today.

      Then later you something like

      QDoxTagValidator validator = ...; //Created from schema file or whatever

      foreach( JavaClass clazz )
      validator.validateClass( clazz );

      This keeps code simple and makes it possibel to do much more intensive validation without effecting parsing (and having to do validation during parsing at all.

      Show
      Peter Donald added a comment - Maybe there is another way. I consider parsing/model building one concern and validation of the model another concern. So maybe validation could be a second pass after the model is built. So instead of doing validation in places like createDocletTag() you instead build the model up as is done today. Then later you something like QDoxTagValidator validator = ...; //Created from schema file or whatever foreach( JavaClass clazz ) validator.validateClass( clazz ); This keeps code simple and makes it possibel to do much more intensive validation without effecting parsing (and having to do validation during parsing at all.
      Hide
      Aslak Hellesøy added a comment -

      I like that!

      Show
      Aslak Hellesøy added a comment - I like that!
      Hide
      Aslak Hellesøy added a comment -

      No need for this in QDox then

      Show
      Aslak Hellesøy added a comment - No need for this in QDox then
      Aslak Hellesøy made changes -
      Resolution Won't Fix [ 2 ]
      Status Assigned [ 2 ] Closed [ 6 ]

        People

        • Assignee:
          Aslak Hellesøy
          Reporter:
          Aslak Hellesøy
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: