Package com.thoughtworks.qdox.model

Examples of com.thoughtworks.qdox.model.Type


        // find the parameter
        JavaClass class2 = builder.getClassByName("package2.Class2");
        JavaMethod method = class2.getMethods()[0];
        JavaParameter parameter = method.getParameters()[0];
        Type type = parameter.getType();

        // verify
        assertEquals("Should include fully qualified name", "package1.Class1$NestedClass", type.getValue());
    }
View Full Code Here


        final JavaMethod[] methods = clazz.getMethods();
        for( int i = 0; i < methods.length; i++ )
        {
            final JavaMethod method = methods[ i ];
            if( methodName.equals( method.getName() )
                && method.getReturns().equals( new Type( "void", 0 ) )
                && method.getParameters().length == 1
                && method.getParameters()[ 0 ].getType().getValue().equals( parameterType ) )
            {
                result.add( method );
        break;   
View Full Code Here

        // interfaces
        List interfaceList = new ArrayList();
        Type[] interfaces = javaClass.getImplements();
        for (int i = 0; i < interfaces.length; i++) {
            Type anInterface = interfaces[i];
            interfaceList.add(createInterfaceMetaData(anInterface));
        }
        classMetaData.setInterfaces(interfaceList);

        // super class
View Full Code Here

        MethodMetaDataImpl data = new MethodMetaDataImpl();
        data.setName(method.getName());
        data.setModifiers(TransformationUtil.getModifiersAsInt(method.getModifiers()));

        Type returnType = method.getReturns();
        if (returnType != null) {
            data.setReturnType(TypeConverter.convertTypeToJava(returnType));
        }

        JavaParameter[] parameters = method.getParameters();
View Full Code Here

        return noSuchEntityException;
    }

    public String getParameterType(JavaParameter parameter) {
        Type returnType = parameter.getType();

        return getTypeGenericsName(returnType);
    }
View Full Code Here

        return StringPool.BLANK;
    }

    public String getReturnType(JavaMethod method) {
        Type returnType = method.getReturns();

        return getTypeGenericsName(returnType);
    }
View Full Code Here

                method, txRequiredList,
                PropsValues.SERVICE_BUILDER_SERVICE_READ_ONLY_PREFIXES);
    }

    public boolean isSoapMethod(JavaMethod method) {
        Type returnType = method.getReturns();

        String returnTypeGenericsName = getTypeGenericsName(returnType);
        String returnValueName = returnType.getValue();

        if (returnTypeGenericsName.contains(
                "com.liferay.portal.kernel.search.") ||
                returnTypeGenericsName.contains("com.liferay.portal.model.Theme") ||
                returnTypeGenericsName.contains(
                        "com.liferay.portlet.social.model.SocialActivityDefinition") ||
                returnTypeGenericsName.equals("java.util.List<java.lang.Object>") ||
                returnValueName.equals("com.liferay.portal.model.Lock") ||
                returnValueName.equals(
                        "com.liferay.portlet.messageboards.model.MBMessageDisplay") ||
                returnValueName.startsWith("java.io") ||
                returnValueName.equals("java.util.Map") ||
                returnValueName.equals("java.util.Properties") ||
                returnValueName.startsWith("javax")) {

            return false;
        }

        if (returnTypeGenericsName.contains(
                "com.liferay.portal.kernel.repository.model.FileEntry") ||
                returnTypeGenericsName.contains(
                        "com.liferay.portal.kernel.repository.model.Folder")) {
        }
        else if (returnTypeGenericsName.contains(
                "com.liferay.portal.kernel.repository.")) {

            return false;
        }

        JavaParameter[] parameters = method.getParameters();

        for (JavaParameter javaParameter : parameters) {
            Type type = javaParameter.getType();

            String parameterTypeName = type.getValue() + _getDimensions(type);

            if (parameterTypeName.equals(
                    "com.liferay.portal.kernel.util.UnicodeProperties") ||
                    parameterTypeName.equals(
                            "com.liferay.portal.theme.ThemeDisplay") ||
View Full Code Here

        for (JavaMethod method : javaClass.getMethods()) {
            methods.put(method.getDeclarationSignature(false), method);
        }

        Type superClass = javaClass.getSuperClass();

        String superClassValue = superClass.getValue();

        while (!superClassValue.endsWith("BaseModelImpl")) {
            int pos = superClassValue.lastIndexOf(StringPool.PERIOD);

            if (pos > 0) {
                superClassValue = superClassValue.substring(pos + 1);
            }

            javaClass = _getJavaClass(
                    _outputPath + "/model/impl/" + superClassValue + ".java");

            for (JavaMethod method : _getMethods(javaClass)) {
                methods.remove(method.getDeclarationSignature(false));
            }

            superClass = javaClass.getSuperClass();
            superClassValue = superClass.getValue();
        }

        Map<String, Object> context = _getContext();

        context.put("entity", entity);
View Full Code Here

                _outputPath + "/service/impl/" + entity.getName() +
                        _getSessionTypeName(sessionType) + "ServiceImpl.java");

        JavaMethod[] methods = _getMethods(javaClass);

        Type superClass = javaClass.getSuperClass();

        String superClassValue = superClass.getValue();

        if (superClassValue.endsWith(
                entity.getName() + _getSessionTypeName(sessionType) +
                        "ServiceBaseImpl")) {
View Full Code Here

                _outputPath + "/service/impl/" + entity.getName() +
                        _getSessionTypeName(sessionType) + "ServiceImpl.java");

        JavaMethod[] methods = _getMethods(javaClass);

        Type superClass = javaClass.getSuperClass();

        String superClassValue = superClass.getValue();

        if (superClassValue.endsWith(
                entity.getName() + _getSessionTypeName(sessionType) +
                        "ServiceBaseImpl")) {
View Full Code Here

TOP

Related Classes of com.thoughtworks.qdox.model.Type

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.