@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public void setType(int type) { this.type = type; } }
@Override protected Map<String, String> extractStructIdlAnnotations() { ThriftUnion annotation = getStructClass().getAnnotation(ThriftUnion.class); if (annotation == null) { return ImmutableMap.of(); } else { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); for (ThriftIdlAnnotation idlAnnotation : annotation.idlAnnotations()) { builder.put(idlAnnotation.key(), idlAnnotation.value()); } return builder.build(); } }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public int getType() { return type; }
@Override protected Map<String, String> extractStructIdlAnnotations() { ThriftStruct annotation = getStructClass().getAnnotation(ThriftStruct.class); if (annotation == null) { return ImmutableMap.of(); } else { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); for (ThriftIdlAnnotation idlAnnotation : annotation.idlAnnotations()) { builder.put(idlAnnotation.key(), idlAnnotation.value()); } return builder.build(); } }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public int getType() { return type; }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public int getType() { return type; }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public int getType() { return type; }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public int getType() { return type; }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey3", value = "testvalue3"), @ThriftIdlAnnotation(key = "testkey4", value = "testvalue4")}) public void setType(int type) { this.type = type; } }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public void setType(int type) { this.type = type; } }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public int getType() { return type; }
@ThriftField(value = 2, idlAnnotations = { @ThriftIdlAnnotation(key = "testkey3", value = "testvalue3"), @ThriftIdlAnnotation(key = "testkey4", value = "testvalue4")}) public void setType(int type) { this.type = type; } }
@ThriftStruct(idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public class StructWithIdlAnnotations { @ThriftField(1) public String message; @ThriftField(2) public int type; }
@ThriftUnion( idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public class UnionWithIdlAnnotations
@ThriftStruct(idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public class StructWithIdlAnnotations { @ThriftField(1) public String message; @ThriftField(2) public int type; }
@ThriftUnion( idlAnnotations = { @ThriftIdlAnnotation(key = "testkey1", value = "testvalue1"), @ThriftIdlAnnotation(key = "testkey2", value = "testvalue2")}) public class UnionWithIdlAnnotations
@ThriftStruct(idlAnnotations = @ThriftIdlAnnotation(key = "message", value = "message")) public class ExceptionWithIdlAnnotations extends Exception { private final int type; @ThriftConstructor public ExceptionWithIdlAnnotations(@ThriftField(1) String message, @ThriftField(2) int type) { super(message); this.type = type; } @Override @ThriftField(1) public String getMessage() { return super.getMessage(); } @ThriftField(2) public int getType() { return type; } }
@ThriftStruct(idlAnnotations = @ThriftIdlAnnotation(key = "message", value = "message")) public class ExceptionWithIdlAnnotations extends Exception { private final int type; @ThriftConstructor public ExceptionWithIdlAnnotations(@ThriftField(1) String message, @ThriftField(2) int type) { super(message); this.type = type; } @Override @ThriftField(1) public String getMessage() { return super.getMessage(); } @ThriftField(2) public int getType() { return type; } }