Search in sources :

Example 1 with CService

use of net.morimekta.providence.reflect.contained.CService in project providence by morimekta.

the class JavaServiceFormatter method appendIface.

private void appendIface(IndentedPrintWriter writer, JService service) throws GeneratorException {
    String inherits = "";
    if (service.getService().getExtendsService() != null) {
        CService other = service.getService().getExtendsService();
        inherits = "extends " + helper.getJavaPackage(other) + "." + new JService(other, helper).className() + ".Iface ";
    }
    if (service.getService().getDocumentation() != null) {
        new BlockCommentBuilder(writer).comment(service.getService().getDocumentation()).finish();
    }
    writer.formatln("public interface Iface %s{", inherits).begin();
    boolean firstMethod = true;
    for (JServiceMethod method : service.declaredMethods()) {
        if (firstMethod) {
            firstMethod = false;
        } else {
            writer.newline();
        }
        String methodThrows = service.methodsThrows(method);
        BlockCommentBuilder comment = new BlockCommentBuilder(writer);
        if (method.getMethod().getDocumentation() != null) {
            comment.comment(method.getMethod().getDocumentation()).newline();
        }
        for (JField param : method.params()) {
            if (param.comment() != null) {
                comment.param_(param.param(), param.comment());
            } else {
                comment.param_(param.param(), "The " + param.name() + " value.");
            }
        }
        if (method.getResponse() != null && !method.getResponse().isVoid()) {
            comment.return_("The " + method.name() + " result.");
        }
        if (methodThrows != null) {
            comment.throws_(methodThrows, "On any declared exception.");
        } else {
            for (JField param : method.exceptions()) {
                if (param.comment() != null) {
                    comment.throws_(param.fieldType(), param.comment());
                } else {
                    comment.throws_(param.fieldType(), "The " + param.name() + " exception.");
                }
            }
        }
        comment.throws_(IOException.class, "On providence or non-declared exceptions.").finish();
        JField ret = method.getResponse();
        if (ret != null) {
            writer.appendln(ret.valueType());
        } else {
            writer.appendln("void");
        }
        writer.format(" %s(", method.methodName()).begin("        ");
        boolean first = true;
        for (JField param : method.params()) {
            if (first) {
                first = false;
            } else {
                writer.append(",");
            }
            writer.formatln("%s %s", param.fieldType(), param.param());
        }
        writer.end().format(")");
        writer.formatln("        throws %s", IOException.class.getName()).begin("               ");
        if (methodThrows != null) {
            writer.append(",");
            writer.formatln("%s", methodThrows);
        } else {
            for (JField ex : method.exceptions()) {
                writer.append(",");
                writer.appendln(ex.instanceType());
            }
        }
        writer.format(";").end();
    }
    writer.end().appendln('}').newline();
}
Also used : JField(net.morimekta.providence.generator.format.java.utils.JField) JService(net.morimekta.providence.generator.format.java.utils.JService) CService(net.morimekta.providence.reflect.contained.CService) JServiceMethod(net.morimekta.providence.generator.format.java.utils.JServiceMethod) BlockCommentBuilder(net.morimekta.providence.generator.format.java.utils.BlockCommentBuilder) IOException(java.io.IOException)

Example 2 with CService

use of net.morimekta.providence.reflect.contained.CService in project providence by morimekta.

the class JavaServiceFormatter method appendDescriptor.

private void appendDescriptor(IndentedPrintWriter writer, JService service) throws GeneratorException {
    writer.formatln("public enum Method implements %s {", PServiceMethod.class.getName()).begin();
    for (JServiceMethod method : service.methods()) {
        String responseDesc = method.getResponseClass() == null ? "null" : service.getResponseClassRef(method) + ".kDescriptor";
        writer.formatln("%s(\"%s\", %b, %s.kDescriptor, %s),", method.constant(), method.name(), method.getMethod().isOneway(), service.getRequestClassRef(method), responseDesc);
    }
    writer.appendln(';').newline();
    writer.appendln("private final String name;").appendln("private final boolean oneway;").formatln("private final %s request;", PStructDescriptor.class.getName()).formatln("private final %s response;", PUnionDescriptor.class.getName()).newline();
    writer.formatln("private Method(String name, boolean oneway, %s request, %s response) {", PStructDescriptor.class.getName(), PUnionDescriptor.class.getName()).appendln("    this.name = name;").appendln("    this.oneway = oneway;").appendln("    this.request = request;").appendln("    this.response = response;").appendln('}').newline();
    writer.appendln("public String getName() {").appendln("    return name;").appendln('}').newline().appendln("public boolean isOneway() {").appendln("    return oneway;").appendln('}').newline().formatln("public %s getRequestType() {", PStructDescriptor.class.getName()).formatln("    return request;").appendln('}').newline().formatln("public %s getResponseType() {", PUnionDescriptor.class.getName()).formatln("    return response;").appendln('}').newline();
    writer.appendln("public static Method findByName(String name) {").begin().appendln("switch (name) {").begin();
    for (JServiceMethod method : service.methods()) {
        writer.formatln("case \"%s\": return %s;", method.name(), method.constant());
    }
    writer.end().appendln('}').appendln("return null;").end().appendln('}');
    writer.appendln(JAnnotation.NON_NULL).appendln("public static Method methodForName(String name) {").begin().appendln("Method method = findByName(name);").appendln("if (method == null) {").formatln("    throw new IllegalArgumentException(\"No such method \\\"\" + name + \"\\\" in service %s\");", service.getService().getQualifiedName()).appendln("}").appendln("return method;").end().appendln('}');
    writer.end().appendln('}').newline();
    // Ended methods enum.
    String inherits = "null";
    if (service.getService().getExtendsService() != null) {
        CService other = service.getService().getExtendsService();
        inherits = helper.getJavaPackage(other) + "." + new JService(other, helper).className() + ".provider()";
    }
    writer.formatln("private static class _Descriptor extends %s {", PService.class.getName()).begin().appendln("private _Descriptor() {").formatln("    super(\"%s\", \"%s\", %s, Method.values());", service.getService().getProgramName(), service.getService().getName(), inherits).appendln('}').newline().appendln("@Override").appendln("public Method getMethod(String name) {").appendln("    return Method.findByName(name);").appendln("}").end().appendln('}').newline();
    writer.formatln("private static class _Provider implements %s {", PServiceProvider.class.getName()).begin().appendln("@Override").formatln("public %s getService() {", PService.class.getName()).appendln("    return kDescriptor;").appendln("}").end().appendln('}').newline();
    writer.formatln("public static final %s kDescriptor = new _Descriptor();", PService.class.getName()).newline();
    writer.formatln("public static %s provider() {", PServiceProvider.class.getName()).appendln("    return new _Provider();").appendln('}').newline();
}
Also used : PServiceProvider(net.morimekta.providence.descriptor.PServiceProvider) PUnionDescriptor(net.morimekta.providence.descriptor.PUnionDescriptor) PStructDescriptor(net.morimekta.providence.descriptor.PStructDescriptor) JService(net.morimekta.providence.generator.format.java.utils.JService) JServiceMethod(net.morimekta.providence.generator.format.java.utils.JServiceMethod) CService(net.morimekta.providence.reflect.contained.CService) PService(net.morimekta.providence.descriptor.PService)

Example 3 with CService

use of net.morimekta.providence.reflect.contained.CService in project providence by morimekta.

the class ProgramConverter method convert.

/**
 * Convert document model to declared document.
 *
 * @param path The program file path.
 * @param path Path of the program file to convert.
 * @param program Program model to convert.
 * @return The declared thrift document.
 */
public CProgram convert(String path, ProgramType program) {
    ImmutableList.Builder<PDeclaredDescriptor<?>> declaredTypes = ImmutableList.builder();
    ImmutableList.Builder<CConst> constants = ImmutableList.builder();
    ImmutableMap.Builder<String, String> typedefs = ImmutableMap.builder();
    ImmutableList.Builder<CService> services = ImmutableList.builder();
    RecursiveTypeRegistry registry = programRegistry.registryForPath(path);
    File dir = new File(path).getParentFile();
    if (program.hasIncludes()) {
        for (String include : program.getIncludes()) {
            String includePath = new File(dir, include).getPath();
            registry.registerInclude(ReflectionUtils.programNameFromPath(include), programRegistry.registryForPath(includePath));
        }
    }
    for (Declaration decl : program.getDecl()) {
        switch(decl.unionField()) {
            case DECL_ENUM:
                {
                    EnumType enumType = decl.getDeclEnum();
                    int nextValue = PEnumDescriptor.DEFAULT_FIRST_VALUE;
                    CEnumDescriptor type = new CEnumDescriptor(enumType.getDocumentation(), program.getProgramName(), enumType.getName(), enumType.getAnnotations());
                    List<CEnumValue> values = new ArrayList<>();
                    for (EnumValue value : enumType.getValues()) {
                        int v = value.hasId() ? value.getId() : nextValue;
                        nextValue = v + 1;
                        values.add(new CEnumValue(value.getDocumentation(), value.getId(), value.getName(), type, value.getAnnotations()));
                    }
                    type.setValues(values);
                    declaredTypes.add(type);
                    registry.register(type);
                    break;
                }
            case DECL_STRUCT:
                {
                    MessageType messageType = decl.getDeclStruct();
                    List<CField> fields = new ArrayList<>();
                    if (messageType.hasFields()) {
                        fields.addAll(messageType.getFields().stream().map(field -> makeField(registry, program.getProgramName(), field, messageType.getVariant())).collect(Collectors.toList()));
                    }
                    PMessageDescriptor<?, ?> type;
                    switch(messageType.getVariant()) {
                        case STRUCT:
                            type = new CStructDescriptor(messageType.getDocumentation(), program.getProgramName(), messageType.getName(), fields, messageType.getAnnotations());
                            break;
                        case UNION:
                            type = new CUnionDescriptor(messageType.getDocumentation(), program.getProgramName(), messageType.getName(), fields, messageType.getAnnotations());
                            break;
                        case EXCEPTION:
                            type = new CExceptionDescriptor(messageType.getDocumentation(), program.getProgramName(), messageType.getName(), fields, messageType.getAnnotations());
                            break;
                        default:
                            throw new UnsupportedOperationException("Unhandled message variant " + messageType.getVariant());
                    }
                    declaredTypes.add(type);
                    registry.register(type);
                    break;
                }
            case DECL_CONST:
                {
                    ConstType constant = decl.getDeclConst();
                    constants.add(makeConst(registry, program.getProgramName(), constant));
                    break;
                }
            case DECL_TYPEDEF:
                {
                    typedefs.put(decl.getDeclTypedef().getName(), decl.getDeclTypedef().getType());
                    registry.registerTypedef(decl.getDeclTypedef().getName(), program.getProgramName(), decl.getDeclTypedef().getType());
                    break;
                }
            case DECL_SERVICE:
                {
                    ServiceType serviceType = decl.getDeclService();
                    ImmutableList.Builder<CServiceMethod> methodBuilder = ImmutableList.builder();
                    if (serviceType.hasMethods()) {
                        for (FunctionType sm : serviceType.getMethods()) {
                            List<CField> rqFields = new ArrayList<>();
                            if (sm.numParams() > 0) {
                                for (FieldType field : sm.getParams()) {
                                    rqFields.add(makeField(registry, program.getProgramName(), field, MessageVariant.STRUCT));
                                }
                            }
                            CStructDescriptor request = new CStructDescriptor(null, program.getProgramName(), serviceType.getName() + '.' + sm.getName() + ".request", rqFields, null);
                            CUnionDescriptor response = null;
                            if (!sm.isOneWay()) {
                                List<CField> rsFields = new ArrayList<>();
                                CField success;
                                if (sm.getReturnType() != null) {
                                    PDescriptorProvider type = registry.getProvider(sm.getReturnType(), program.getProgramName(), sm.getAnnotations());
                                    success = new CField(null, 0, PRequirement.OPTIONAL, "success", type, null, null);
                                } else {
                                    success = new CField(null, 0, PRequirement.OPTIONAL, "success", PPrimitive.VOID.provider(), null, null);
                                }
                                rsFields.add(success);
                                if (sm.numExceptions() > 0) {
                                    for (FieldType field : sm.getExceptions()) {
                                        rsFields.add(makeField(registry, program.getProgramName(), field, MessageVariant.UNION));
                                    }
                                }
                                response = new CUnionDescriptor(null, program.getProgramName(), serviceType.getName() + '.' + sm.getName() + ".response", rsFields, null);
                            }
                            CServiceMethod method = new CServiceMethod(sm.getDocumentation(), sm.getName(), sm.isOneWay(), request, response, sm.getAnnotations());
                            methodBuilder.add(method);
                        }
                    // for each method
                    }
                    // if has methods
                    PServiceProvider extendsProvider = null;
                    if (serviceType.hasExtend()) {
                        extendsProvider = registry.getServiceProvider(serviceType.getExtend(), program.getProgramName());
                    }
                    CService service = new CService(serviceType.getDocumentation(), program.getProgramName(), serviceType.getName(), extendsProvider, methodBuilder.build(), serviceType.getAnnotations());
                    services.add(service);
                    registry.registerRecursively(service);
                }
        }
    }
    return new CProgram(path, program.getDocumentation(), program.getProgramName(), program.getNamespaces(), getIncludedProgramNames(program), program.getIncludes(), typedefs.build(), declaredTypes.build(), services.build(), constants.build());
}
Also used : PEnumDescriptor(net.morimekta.providence.descriptor.PEnumDescriptor) PPrimitive(net.morimekta.providence.descriptor.PPrimitive) PDeclaredDescriptor(net.morimekta.providence.descriptor.PDeclaredDescriptor) CEnumValue(net.morimekta.providence.reflect.contained.CEnumValue) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) ImmutableList(com.google.common.collect.ImmutableList) EnumValue(net.morimekta.providence.model.EnumValue) ReflectionUtils.programNameFromPath(net.morimekta.providence.reflect.util.ReflectionUtils.programNameFromPath) CExceptionDescriptor(net.morimekta.providence.reflect.contained.CExceptionDescriptor) TypeRegistry(net.morimekta.providence.util.TypeRegistry) EnumType(net.morimekta.providence.model.EnumType) CService(net.morimekta.providence.reflect.contained.CService) PServiceProvider(net.morimekta.providence.descriptor.PServiceProvider) CConst(net.morimekta.providence.reflect.contained.CConst) ImmutableMap(com.google.common.collect.ImmutableMap) CProgram(net.morimekta.providence.reflect.contained.CProgram) Declaration(net.morimekta.providence.model.Declaration) Set(java.util.Set) ConstType(net.morimekta.providence.model.ConstType) Collectors(java.util.stream.Collectors) File(java.io.File) PDescriptorProvider(net.morimekta.providence.descriptor.PDescriptorProvider) CUnionDescriptor(net.morimekta.providence.reflect.contained.CUnionDescriptor) MessageVariant(net.morimekta.providence.model.MessageVariant) List(java.util.List) MessageType(net.morimekta.providence.model.MessageType) CEnumDescriptor(net.morimekta.providence.reflect.contained.CEnumDescriptor) CField(net.morimekta.providence.reflect.contained.CField) FunctionType(net.morimekta.providence.model.FunctionType) CStructDescriptor(net.morimekta.providence.reflect.contained.CStructDescriptor) PRequirement(net.morimekta.providence.descriptor.PRequirement) PMessageDescriptor(net.morimekta.providence.descriptor.PMessageDescriptor) ServiceType(net.morimekta.providence.model.ServiceType) FieldType(net.morimekta.providence.model.FieldType) ProgramType(net.morimekta.providence.model.ProgramType) CServiceMethod(net.morimekta.providence.reflect.contained.CServiceMethod) ImmutableList(com.google.common.collect.ImmutableList) CEnumValue(net.morimekta.providence.reflect.contained.CEnumValue) EnumValue(net.morimekta.providence.model.EnumValue) CServiceMethod(net.morimekta.providence.reflect.contained.CServiceMethod) CUnionDescriptor(net.morimekta.providence.reflect.contained.CUnionDescriptor) EnumType(net.morimekta.providence.model.EnumType) ServiceType(net.morimekta.providence.model.ServiceType) CField(net.morimekta.providence.reflect.contained.CField) CConst(net.morimekta.providence.reflect.contained.CConst) CService(net.morimekta.providence.reflect.contained.CService) ArrayList(java.util.ArrayList) ImmutableList(com.google.common.collect.ImmutableList) List(java.util.List) Declaration(net.morimekta.providence.model.Declaration) PMessageDescriptor(net.morimekta.providence.descriptor.PMessageDescriptor) CStructDescriptor(net.morimekta.providence.reflect.contained.CStructDescriptor) ConstType(net.morimekta.providence.model.ConstType) MessageType(net.morimekta.providence.model.MessageType) CEnumValue(net.morimekta.providence.reflect.contained.CEnumValue) FunctionType(net.morimekta.providence.model.FunctionType) ImmutableMap(com.google.common.collect.ImmutableMap) FieldType(net.morimekta.providence.model.FieldType) PServiceProvider(net.morimekta.providence.descriptor.PServiceProvider) CProgram(net.morimekta.providence.reflect.contained.CProgram) PDeclaredDescriptor(net.morimekta.providence.descriptor.PDeclaredDescriptor) CEnumDescriptor(net.morimekta.providence.reflect.contained.CEnumDescriptor) File(java.io.File) PDescriptorProvider(net.morimekta.providence.descriptor.PDescriptorProvider) CExceptionDescriptor(net.morimekta.providence.reflect.contained.CExceptionDescriptor)

Example 4 with CService

use of net.morimekta.providence.reflect.contained.CService in project providence by morimekta.

the class JavaGenerator method generate.

@Override
@SuppressWarnings("resource")
public void generate(@Nonnull ProgramTypeRegistry registry) throws IOException, GeneratorException {
    CProgram program = registry.getProgram();
    String javaPackage = JUtils.getJavaPackage(program);
    JHelper helper = new JHelper(registry);
    String path = JUtils.getPackageClassPath(javaPackage);
    if (program.getConstants().size() > 0) {
        String file = helper.getConstantsClassName(program) + ".java";
        OutputStream out = new BufferedOutputStream(getFileManager().create(path, file));
        try {
            IndentedPrintWriter writer = new IndentedPrintWriter(out);
            appendFileHeader(writer, helper, program);
            constFomatter(writer, helper).appendProgramClass(program);
            writer.flush();
        } finally {
            try {
                getFileManager().finalize(out);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    if (javaOptions.hazelcast_portable && program.getConstants().stream().anyMatch(t -> t.getName().equals("FACTORY_ID"))) {
        String file = helper.getHazelcastFactoryClassName(program) + ".java";
        OutputStream out = new BufferedOutputStream(getFileManager().create(path, file));
        try {
            IndentedPrintWriter writer = new IndentedPrintWriter(out);
            appendFileHeader(writer, helper, program);
            hazelcastFomatter(writer, helper).appendProgramClass(program);
            writer.flush();
        } finally {
            try {
                getFileManager().finalize(out);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    for (PDeclaredDescriptor<?> type : program.getDeclaredTypes()) {
        String file = JUtils.getClassName(type) + ".java";
        OutputStream out = new BufferedOutputStream(getFileManager().create(path, file));
        try {
            IndentedPrintWriter writer = new IndentedPrintWriter(out);
            appendFileHeader(writer, helper, program);
            switch(type.getType()) {
                case MESSAGE:
                    messageFormatter(writer, helper).appendMessageClass((PMessageDescriptor<?, ?>) type);
                    break;
                case ENUM:
                    enumFormatter(writer).appendEnumClass((CEnumDescriptor) type);
                    break;
                default:
                    throw new GeneratorException("Unhandled declaration type.");
            }
            writer.flush();
        } finally {
            try {
                getFileManager().finalize(out);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    for (CService service : program.getServices()) {
        String file = JUtils.getClassName(service) + ".java";
        OutputStream out = new BufferedOutputStream(getFileManager().create(path, file));
        try {
            IndentedPrintWriter writer = new IndentedPrintWriter(out);
            appendFileHeader(writer, helper, program);
            serviceFormatter(writer, helper).appendServiceClass(service);
            writer.flush();
        } finally {
            try {
                getFileManager().finalize(out);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
Also used : ProgramTypeRegistry(net.morimekta.providence.reflect.util.ProgramTypeRegistry) OutputStream(java.io.OutputStream) CService(net.morimekta.providence.reflect.contained.CService) HazelcastPortableProgramFormatter(net.morimekta.providence.generator.format.java.program.extras.HazelcastPortableProgramFormatter) BaseMessageFormatter(net.morimekta.providence.generator.format.java.shared.BaseMessageFormatter) CProgram(net.morimekta.providence.reflect.contained.CProgram) Generator(net.morimekta.providence.generator.Generator) GeneratorException(net.morimekta.providence.generator.GeneratorException) JUtils(net.morimekta.providence.generator.format.java.utils.JUtils) IndentedPrintWriter(net.morimekta.util.io.IndentedPrintWriter) BaseServiceFormatter(net.morimekta.providence.generator.format.java.shared.BaseServiceFormatter) IOException(java.io.IOException) PDeclaredDescriptor(net.morimekta.providence.descriptor.PDeclaredDescriptor) BufferedOutputStream(java.io.BufferedOutputStream) BaseProgramFormatter(net.morimekta.providence.generator.format.java.shared.BaseProgramFormatter) JHelper(net.morimekta.providence.generator.format.java.utils.JHelper) CEnumDescriptor(net.morimekta.providence.reflect.contained.CEnumDescriptor) FileManager(net.morimekta.providence.generator.util.FileManager) BaseEnumFormatter(net.morimekta.providence.generator.format.java.shared.BaseEnumFormatter) PMessageDescriptor(net.morimekta.providence.descriptor.PMessageDescriptor) GeneratorOptions(net.morimekta.providence.generator.GeneratorOptions) Nonnull(javax.annotation.Nonnull) JHelper(net.morimekta.providence.generator.format.java.utils.JHelper) CProgram(net.morimekta.providence.reflect.contained.CProgram) OutputStream(java.io.OutputStream) BufferedOutputStream(java.io.BufferedOutputStream) CService(net.morimekta.providence.reflect.contained.CService) IOException(java.io.IOException) GeneratorException(net.morimekta.providence.generator.GeneratorException) BufferedOutputStream(java.io.BufferedOutputStream) IndentedPrintWriter(net.morimekta.util.io.IndentedPrintWriter)

Example 5 with CService

use of net.morimekta.providence.reflect.contained.CService in project providence by morimekta.

the class JavaServiceFormatter method appendServiceClass.

@Override
public void appendServiceClass(CService cs) throws GeneratorException, IOException {
    JService service = new JService(cs, helper);
    if (cs.getDocumentation() != null) {
        new BlockCommentBuilder(writer).comment(cs.getDocumentation()).finish();
    }
    String inherits = "";
    if (service.getService().getExtendsService() != null) {
        CService other = service.getService().getExtendsService();
        inherits = "extends " + helper.getJavaPackage(other) + "." + new JService(other, helper).className() + " ";
    }
    writer.appendln("@SuppressWarnings(\"unused\")");
    if (javaOptions.generated_annotation_version) {
        writer.formatln("@%s(\"%s %s\")", Generated.class.getName(), generatorOptions.generator_program_name, generatorOptions.program_version);
    } else {
        writer.formatln("@%s(\"%s\")", Generated.class.getName(), generatorOptions.generator_program_name);
    }
    writer.formatln("public class %s %s{", service.className(), inherits).begin();
    appendIface(writer, service);
    appendClient(writer, service);
    appendProcessor(writer, service);
    appendDescriptor(writer, service);
    appendStructs(writer, service);
    // protected constructor should defeat instantiation, but can inherit
    // from parent to be able to get access to inner protected classes.
    writer.formatln("protected %s() {}", service.className());
    writer.end().appendln('}');
}
Also used : Generated(javax.annotation.Generated) JService(net.morimekta.providence.generator.format.java.utils.JService) CService(net.morimekta.providence.reflect.contained.CService) BlockCommentBuilder(net.morimekta.providence.generator.format.java.utils.BlockCommentBuilder)

Aggregations

CService (net.morimekta.providence.reflect.contained.CService)5 JService (net.morimekta.providence.generator.format.java.utils.JService)3 IOException (java.io.IOException)2 PDeclaredDescriptor (net.morimekta.providence.descriptor.PDeclaredDescriptor)2 PMessageDescriptor (net.morimekta.providence.descriptor.PMessageDescriptor)2 PServiceProvider (net.morimekta.providence.descriptor.PServiceProvider)2 BlockCommentBuilder (net.morimekta.providence.generator.format.java.utils.BlockCommentBuilder)2 JServiceMethod (net.morimekta.providence.generator.format.java.utils.JServiceMethod)2 CEnumDescriptor (net.morimekta.providence.reflect.contained.CEnumDescriptor)2 CProgram (net.morimekta.providence.reflect.contained.CProgram)2 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 BufferedOutputStream (java.io.BufferedOutputStream)1 File (java.io.File)1 OutputStream (java.io.OutputStream)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Set (java.util.Set)1 TreeSet (java.util.TreeSet)1 Collectors (java.util.stream.Collectors)1