@Test public void buildTypeName() throws Exception { assertEquals("_200", Names.typeName("_200")); assertEquals("Fun", Names.typeName("/fun")); assertEquals("Fun", Names.typeName("/fun")); assertEquals("CodeBytes", Names.typeName(" assertEquals("Root", Names.typeName("")); assertEquals("FunAllo", Names.typeName("fun_allo")); assertEquals("FunAllo", Names.typeName("fun allo")); assertEquals("FunAllo", Names.typeName("funAllo")); assertEquals("FunAllo", Names.typeName("FunAllo")); assertEquals("Fun200Allo", Names.typeName("fun_200Allo")); assertEquals("FunAllo", Names.typeName("/FunAllo")); assertEquals("FunAllo", Names.typeName("Fun", "allo")); assertEquals("FunAllo", Names.typeName("fun", "_allo")); assertEquals("FunAllo", Names.typeName("fun", "allo")); }
public static String typeName(String... name) { if (name.length == 1 && isBlank(name[0])) { return "Root"; } List<String> values = new ArrayList<>(); int i = 0; for (String s : name) { String value = buildPart(i, s, NameFixer.CAMEL_UPPER); values.add(value); i++; } return Strings.join(values, ""); }
Names { public static String typeName(String... name) { if (name.length == 1 && isBlank(name[0])) { return "Root"; } List<String> values = new ArrayList<>(); int i = 0; for (String s : name) { String value = buildPart(i, s, NameFixer.CAMEL_UPPER); values.add(value); i++; } return Strings.join(values, ""); } }
Names { public static String typeName(String... name) { if (name.length == 1 && isBlank(name[0])) { return "Root"; } List<String> values = new ArrayList<>(); int i = 0; for (String s : name) { String value = buildPart(i, s, NameFixer.CAMEL_UPPER); values.add(value); i++; } return Strings.join(values, ""); } private  Names(); }
Names { public static String typeName(String... name) { if (name.length == 1 && isBlank(name[0])) { return "Root"; } List<String> values = new ArrayList<>(); int i = 0; for (String s : name) { String value = buildPart(i, s, NameFixer.CAMEL_UPPER); values.add(value); i++; } return Strings.join(values, ""); } private  Names(); static String typeName(String... name); static String methodName(String... name); static String variableName(String... name); static String resourceMethodName(GResource resource, GMethod method); static String responseClassName(GResource resource, GMethod method); static String javaTypeName(Resource resource, TypeDeclaration declaration); static String javaTypeName(Resource resource, Method method, TypeDeclaration declaration); static String ramlTypeName(Resource resource, Method method, TypeDeclaration declaration); static String ramlTypeName(Resource resource, TypeDeclaration declaration); static String javaTypeName(Resource resource, Method method, Response response,
                                    TypeDeclaration declaration); static String ramlTypeName(Resource resource, Method method, Response response,
                                    TypeDeclaration declaration); static String ramlTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method, BodyLike typeDeclaration); static String ramlTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method,
                                    org.raml.v2.api.model.v08.bodies.Response response, BodyLike typeDeclaration); static String javaTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method, BodyLike typeDeclaration); static String javaTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method,
                                    org.raml.v2.api.model.v08.bodies.Response response, BodyLike typeDeclaration); }
Names { public static String typeName(String... name) { if (name.length == 1 && isBlank(name[0])) { return "Root"; } List<String> values = new ArrayList<>(); int i = 0; for (String s : name) { String value = buildPart(i, s, NameFixer.CAMEL_UPPER); values.add(value); i++; } return Strings.join(values, ""); } private  Names(); static String typeName(String... name); static String methodName(String... name); static String variableName(String... name); static String resourceMethodName(GResource resource, GMethod method); static String responseClassName(GResource resource, GMethod method); static String javaTypeName(Resource resource, TypeDeclaration declaration); static String javaTypeName(Resource resource, Method method, TypeDeclaration declaration); static String ramlTypeName(Resource resource, Method method, TypeDeclaration declaration); static String ramlTypeName(Resource resource, TypeDeclaration declaration); static String javaTypeName(Resource resource, Method method, Response response,
                                    TypeDeclaration declaration); static String ramlTypeName(Resource resource, Method method, Response response,
                                    TypeDeclaration declaration); static String ramlTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method, BodyLike typeDeclaration); static String ramlTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method,
                                    org.raml.v2.api.model.v08.bodies.Response response, BodyLike typeDeclaration); static String javaTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method, BodyLike typeDeclaration); static String javaTypeName(org.raml.v2.api.model.v08.resources.Resource resource,
                                    org.raml.v2.api.model.v08.methods.Method method,
                                    org.raml.v2.api.model.v08.bodies.Response response, BodyLike typeDeclaration);  }