Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3446

Add support for annotations

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      I understand currently it is not possible to write a thrift file which when compiled will generate java code that can have annotations in it. I am working on a project in which I need the fields in generated java classes to have annotations on them e.g., in below I have defined a annotation named Column that is used on fields in MyClass:
      @Retention(value= RetentionPolicy.RUNTIME)
      @interface Column {
      int value() default -1;
      }

      public class MyClass {
      @Column(0)
      private String stateFP;

      @Column(1)
      private String countyFP;

      @Column(2)
      private String countyNS;

      @Column(3)
      private String geoid;

      Attachments

        Activity

          People

            Unassigned Unassigned
            siddjain@live.com Siddharth Jain
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: