castor
  1. castor
  2. CASTOR-2569 annotation_processing Module
  3. CASTOR-2636

Extend annotation processing framework to allow target aware processors and service (including base implementation)

    Details

    • Type: Sub-task Sub-task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.1
    • Component/s: JPA annotations
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      3

      Description

      Added new TargetAwareAnnotationProcessor (plus service and downward compatible service base implementation)

      1. patch-annotationprocessing-20090201.patch
        23 kB
        Peter Schmidt
      2. patch-C2636-20090206.patch
        27 kB
        Peter Schmidt
      3. patch-C2636-20090208.patch
        30 kB
        Peter Schmidt

        Activity

        Hide
        Werner Guttmann added a comment -

        Peter, can you please re-attach the patch, as I believe that there's missing code in the test case.

        Show
        Werner Guttmann added a comment - Peter, can you please re-attach the patch, as I believe that there's missing code in the test case.
        Hide
        Peter Schmidt added a comment -

        Eclipse messed with the patch file... which was good, because they didn't work properly anyway.
        Now this is fixed.
        Also: added ability of throwing a Mapping Exception if an Annotation is placed on a target where it should not be, instead of only returning false, which does not allow you to add further information about the reason of failure.

        Show
        Peter Schmidt added a comment - Eclipse messed with the patch file... which was good, because they didn't work properly anyway. Now this is fixed. Also: added ability of throwing a Mapping Exception if an Annotation is placed on a target where it should not be, instead of only returning false, which does not allow you to add further information about the reason of failure.
        Hide
        Werner Guttmann added a comment -

        Thanks, Peter. Will look into this in the afternoon, once I am on my train towards snow ... .

        Show
        Werner Guttmann added a comment - Thanks, Peter. Will look into this in the afternoon, once I am on my train towards snow ... .
        Hide
        Werner Guttmann added a comment -

        Okay, just following up my own email from the afternoon: whilst I like the idea with the use of the MappingException, this does not work as intended. The class MappingException is part of the XML module, and the core module (where the Annotation* classes live) must not depend upon the XML module. I have tried to move the MappingException class to the core module (within the same package, as this class is part of the public API) ... but then I get sealing exceptions.

        As such, I'd introduce a new Exception (MappingException, but local to the annotation processing package(s), and then (somewhere else) convert this to the XML MappingException. I hope I have expressed myslef clearly .. ,.

        Show
        Werner Guttmann added a comment - Okay, just following up my own email from the afternoon: whilst I like the idea with the use of the MappingException, this does not work as intended. The class MappingException is part of the XML module, and the core module (where the Annotation* classes live) must not depend upon the XML module. I have tried to move the MappingException class to the core module (within the same package, as this class is part of the public API) ... but then I get sealing exceptions. As such, I'd introduce a new Exception (MappingException, but local to the annotation processing package(s), and then (somewhere else) convert this to the XML MappingException . I hope I have expressed myslef clearly .. ,.
        Hide
        Peter Schmidt added a comment -

        Ok. I introduced a new Exception within the annotation processing package, so this package is "stand alone".

        Cheers, Peter

        Show
        Peter Schmidt added a comment - Ok. I introduced a new Exception within the annotation processing package, so this package is "stand alone". Cheers, Peter

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Peter Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 45 minutes
              45m