Skip to content

Commit

Permalink
Added display annotation to enums (finos#650)
Browse files Browse the repository at this point in the history
* Added display annotation to enums
  • Loading branch information
minesh-s-patel authored Sep 15, 2023
1 parent 6a788a0 commit 56348ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class EnumGenerator {
«FOR value: allEnumsValues(e) SEPARATOR ',\n' AFTER ';'»
«javadoc(value)»
«value.contributeAnnotations»
@«com.rosetta.model.lib.annotations.RosettaEnumValue»("«value.name»") «convertValuesWithDisplay(value)»
@«com.rosetta.model.lib.annotations.RosettaEnumValue»(value = "«value.name»"«IF value.display !== null», displayName = "«value.display»"«ENDIF») «convertValuesWithDisplay(value)»
«ENDFOR»
private static «Map»<«String», «e.name»> values;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
@Retention(RetentionPolicy.RUNTIME)
public @interface RosettaEnumValue {
String value() default "";
String displayName() default "";

}

0 comments on commit 56348ff

Please sign in to comment.