Package com.facebook.swift.generator.template

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


    {
        final ThriftException exception = ThriftException.class.cast(visitable);
        final StructContext exceptionContext = contextGenerator.structFromThrift(exception);

        for (final ThriftField field : exception.getFields()) {
            exceptionContext.addField(contextGenerator.fieldFromThrift(field));
        }

        render(exceptionContext, "exception");
    }
}
View Full Code Here


    {
        final Struct struct = Struct.class.cast(visitable);
        final StructContext structContext = contextGenerator.structFromThrift(struct);

        for (final ThriftField field : struct.getFields()) {
            structContext.addField(contextGenerator.fieldFromThrift(field));
        }

        render(structContext, "struct");
    }
}
View Full Code Here

    {
        final Union union = Union.class.cast(visitable);
        final StructContext unionContext = contextGenerator.structFromThrift(union);

        for (final ThriftField field : union.getFields()) {
            unionContext.addField(contextGenerator.fieldFromThrift(field));
        }

        render(unionContext, "union");
    }
}
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.