Uploaded image for project: 'Solder'
  1. Solder
  2. SOLDER-12

Add isMetadataChanged() accessor to AnnotatedTypeBuilder

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Feature Request
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.0.Beta1
    • Future
    • Builders
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • Low

    Description

      As an optimization, it makes sense to only create the AnnotatedType and assign it to ProcessAnnotatedType if the metadata has changed in anyway. Otherwise, you are wrapping the type just for the sake of wrapping it.

      Therefore, I propose that any change to the state of the annotated type be tracked by a changed flag that is accessible by calling the AnnotatedTypeBuilder#isMetadataChanged() (or similarly named) method. It would be used as follows:

      AnnotatedTypeBuilder b = AnnotatedTypeBuilder.readFromType(event.getAnnotatedType(), true);

      // do extension logic

      if (b.isMetadataChanged())
      {
      event.setAnnotatedType(b.create());
      }

      Attachments

        Activity

          People

            dan.j.allen Dan Allen (Inactive)
            dan.j.allen Dan Allen (Inactive)
            Archiver:
            samahaja@redhat.com Sagar Mahajan

            Dates

              Created:
              Updated:
              Archived: