Package com.facebook.swift.generator.template

Examples of com.facebook.swift.generator.template.MethodContext


    {
        final Service service = Service.class.cast(visitable);
        final ServiceContext serviceContext = contextGenerator.serviceFromThrift(service);

        for (ThriftMethod method: service.getMethods()) {
            final MethodContext methodContext = contextGenerator.methodFromThrift(method);
            serviceContext.addMethod(methodContext);

            for (final ThriftField field : method.getArguments()) {
                methodContext.addParameter(contextGenerator.fieldFromThrift(field));
            }

            for (final ThriftField field : method.getThrowsFields()) {
                methodContext.addException(contextGenerator.exceptionFromThrift(field));
            }

            if (config.containsTweak(SwiftGeneratorTweak.ADD_THRIFT_EXCEPTION)) {
                methodContext.addException(THRIFT_EXCEPTION_CONTEXT);
            }
        }

        render(serviceContext, "service");
    }
View Full Code Here

TOP

Related Classes of com.facebook.swift.generator.template.MethodContext

Copyright © 2018 www.massapicom. 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.