Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-990

TypeConverter support with @Converter meta-annotation and not only @Converter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • camel-core
    • None
    • Patch Available

    Description

      Today TypeConverter detection is based on org.apache.camel.@Converter annotation.
      Allow user to override this by using meta-annotation. This can be useful to hide camel dependencies, when extending the framework.

      ie, this can be done:

      package some.package.of.mine;
      @Retention(RetentionPolicy.RUNTIME)
      @Target(

      {ElementType.TYPE, ElementType.METHOD }

      )
      @org.apache.camel.Converter
      public @interface OwnConverterAnnotation {
      }

      import some.package.of.mine.OwnConverterAnnotation;

      @OwnConverterAnnotation
      public class FileToXXXConverter {

      @OwnConverterAnnotation
      public static XXX toWorkflowEntry(File file) throws IOException

      { return new XXX(); }

      }

      Attachments

        Activity

          People

            hadrian Hadrian Zbarcea
            sauvray Seb Auvray
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified