File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/GraphODataTemplateWriter/CodeHelpers/Android Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,8 @@ import {0}.generated.*;
515515import {0}.options.*;
516516import {0}.serializer.*;
517517
518- import java.util.Arrays;";
518+ import java.util.Arrays;
519+ import java.util.EnumSet;";
519520 return string.Format(format,
520521 host.CurrentModel.NamespaceName(),
521522 host.TemplateInfo.OutputParentDirectory);
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ public static string GetReservedPrefix(this OdcmType @type)
2727
2828 public static string GetTypeString ( this OdcmType @type )
2929 {
30+ // If isFlags = true, return an EnumSet instead of an enum. This will be
31+ // serialized to and deserialized from a string
32+ if ( String . Equals ( @type . ToString ( ) , "Vipr.Core.CodeModel.OdcmEnum" ) && @type . AsOdcmEnum ( ) . IsFlags )
33+ {
34+ return "EnumSet<" + @type . Name . ToUpperFirstChar ( ) + ">" ;
35+ }
36+
3037 switch ( @type . Name )
3138 {
3239 case "Int16" :
You can’t perform that action at this time.
0 commit comments