Package com.mysema.codegen.model

Examples of com.mysema.codegen.model.Parameter


    public List<Parameter> transformParams(List<? extends VariableElement> params) {
        List<Parameter> parameters = new ArrayList<Parameter>(params.size());
        for (VariableElement param : params) {
            Type paramType = getType(param);
            parameters.add(new Parameter(param.getSimpleName().toString(), paramType));
        }
        return parameters;
    }
View Full Code Here


            Type superClass = new ClassType(cl.getSuperclass());
            writer.beginClass(type, superClass);
            for (Method m : cl.getDeclaredMethods()) {
                List<Parameter> params = new ArrayList<Parameter>();
                for (Class<?> paramType : m.getParameterTypes()) {
                    params.add(new Parameter("arg"+params.size(), new ClassType(paramType)));
                }
                Type returnType = new ClassType(m.getReturnType());
                writer.beginPublicMethod(returnType, ":"+m.getName(), params.toArray(new Parameter[params.size()]));
                writer.end();
            }
View Full Code Here

                        if (annotation.annotationType().equals(QueryType.class)) {
                            QueryType queryType = (QueryType)annotation;
                            parameterType = parameterType.as(TypeCategory.valueOf(queryType.value().name()));
                        }
                    }
                    parameters.add(new Parameter("param" + i, parameterType));
                }
                type.addConstructor(new com.mysema.codegen.model.Constructor(parameters));
            }
        }
    }
View Full Code Here

            Type classType = new ClassType(TypeCategory.get(cl.getName()), cl);
            type.addProperty(new Property(type, StringUtils.uncapitalize(cl.getSimpleName()), classType));
        }

        // constructor
        Parameter firstName = new Parameter("firstName", new ClassType(TypeCategory.STRING, String.class));
        Parameter lastName = new Parameter("lastName", new ClassType(TypeCategory.STRING, String.class));
        type.addConstructor(new Constructor(Arrays.asList(firstName, lastName)));
    }
View Full Code Here

TOP

Related Classes of com.mysema.codegen.model.Parameter

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.