Package com.facebook.swift.generator.template

Examples of com.facebook.swift.generator.template.EnumContext.addField()


    {
        final IntegerEnum integerEnum = IntegerEnum.class.cast(visitable);
        final EnumContext enumContext = contextGenerator.enumFromThrift(integerEnum);

        for (final IntegerEnumField field : integerEnum.getFields()) {
            enumContext.addField(contextGenerator.fieldFromThrift(field));
        }

        render(enumContext, "intEnum");
    }
}
View Full Code Here


    {
        final StringEnum stringEnum = StringEnum.class.cast(visitable);
        final EnumContext enumContext = contextGenerator.enumFromThrift(stringEnum);

        for (final String value : stringEnum.getValues()) {
            enumContext.addField(contextGenerator.fieldFromThrift(value));
        }

        render(enumContext, "stringEnum");
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.