Package com.thoughtworks.qdox.model

Examples of com.thoughtworks.qdox.model.JavaClass.addMethod()


            if (metaVo.isStrictOrdering()) {
                method = new JavaMethod(new Type("int"), "compareTo");
                method.setModifiers(new String[]{"public"});
                method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")});
                retVal.addMethod(method);
            }

            method = new JavaMethod(new Type("java.lang.Object"), "clone");
            modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
            modifiers[0] = "public";
View Full Code Here


            modifiers[0] = "public";
            if (metaVo.isFullSynchronization()) {
                modifiers[1] = "synchronized";
            }
            method.setModifiers(modifiers);
            retVal.addMethod(method);

            method = new JavaMethod(new Type("int"), "hashCode");
            modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1];
            modifiers[0] = "public";
            if (metaVo.isFullSynchronization()) {
View Full Code Here

            modifiers[0] = "public";
            if (metaVo.isFullSynchronization()) {
                modifiers[1] = "synchronized";
            }
            method.setModifiers(modifiers);
            retVal.addMethod(method);

            JavaClass innerClass = createDynamicJavaClass("ReadOnly" + getDestinationClassname(metadata), getDestinationPackage(metadata), null, getMetadataProvider());
            innerClass.setModifiers(new String[]{"final","private"});
            retVal.addClass(innerClass);
View Full Code Here

            }
            innerClass.setImplementz(implementzTypes);

            method = new JavaMethod(retVal.asType(), "underlying");
            method.setModifiers(new String[]{"private"});
            innerClass.addMethod(method);

            for (int j = 0; (fields != null) && (j < fields.length); j++) {
                ValueObjectFieldMetadata vField = fields[j];
                method = new JavaMethod(vField.getProperty().getType(), vField.getProperty().getAccessor().getName());
                method.setModifiers(new String[]{"public"});
View Full Code Here

            for (int j = 0; (fields != null) && (j < fields.length); j++) {
                ValueObjectFieldMetadata vField = fields[j];
                method = new JavaMethod(vField.getProperty().getType(), vField.getProperty().getAccessor().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);

                method = new JavaMethod(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet");
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
            }
View Full Code Here

                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);

                method = new JavaMethod(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet");
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
            }

            for (int k = 0; k < nonCollectionRel.length; k++) {
                ValueObjectRelationMetadata nonColRel = nonCollectionRel[k];
View Full Code Here

            for (int k = 0; k < nonCollectionRel.length; k++) {
                ValueObjectRelationMetadata nonColRel = nonCollectionRel[k];

                method = new JavaMethod(nonColRel.getProperty().getType(), nonColRel.getProperty().getAccessor().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);

                method = new JavaMethod(new Type("boolean"), nonColRel.getProperty().getName()+"HasBeenSet");
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
            }
View Full Code Here

                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);

                method = new JavaMethod(new Type("boolean"), nonColRel.getProperty().getName()+"HasBeenSet");
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
            }

            for (int k = 0; k < collectionRel.length; k++) {
                ValueObjectRelationMetadata colRel = collectionRel[k];
View Full Code Here

            for (int k = 0; k < collectionRel.length; k++) {
                ValueObjectRelationMetadata colRel = collectionRel[k];

                method = new JavaMethod(colRel.getProperty().getType(), "getAdded" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
                method = new JavaMethod(colRel.getProperty().getType(), "getOnceAdded" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
                method = new JavaMethod(colRel.getProperty().getType(), "getRemoved" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
View Full Code Here

                method = new JavaMethod(colRel.getProperty().getType(), "getAdded" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
                method = new JavaMethod(colRel.getProperty().getType(), "getOnceAdded" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
                method = new JavaMethod(colRel.getProperty().getType(), "getRemoved" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
                innerClass.addMethod(method);
                method = new JavaMethod(colRel.getProperty().getType(), "getUpdated" + colRel.getProperty().getName());
                method.setModifiers(new String[]{"public"});
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.