Examples of addMethod()


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

            }

            method = new JavaMethod(getDestinationClassname(metadata));
            method.setConstructor(true);
            method.setModifiers(new String[] { "public" });
            retVal.addMethod(method);

            if (metaVo.isGeneratePKConstructor() && metaVo.hasPk()) {
                if(!isEmpty(nonPkFields) || !metaVo.isSimplePkProperty()) {
                    method = new JavaMethod(getDestinationClassname(metadata));
                    method.setConstructor(true);
View Full Code Here

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

                innerClass.addMethod(method);
            }

            method = new JavaMethod(new Type("int"), "hashCode");
            method.setModifiers(new String[]{"public"});
            innerClass.addMethod(method);

            method = new JavaMethod(new Type("boolean"), "equals");
            method.setModifiers(new String[]{"public"});
            method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")});
            innerClass.addMethod(method);
View Full Code Here

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

            innerClass.addMethod(method);

            method = new JavaMethod(new Type("boolean"), "equals");
            method.setModifiers(new String[]{"public"});
            method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")});
            innerClass.addMethod(method);

            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")});
View Full Code Here

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")});
                innerClass.addMethod(method);
            }

            // add to list
            retLst.add(retVal);
        }
View Full Code Here

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

        Collection methods = getCreateMethods(metadata);
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            method = new DuplicatedJavaMethod((JavaMethod)iter.next());
            method.setModifiers(new String[0]);
            retVal.addMethod(method);
        }

        if (ejbUtils.isEntityBean(metadata)) {
            methods = getFinderMethods(metadata);
            for (Iterator iter = methods.iterator(); iter.hasNext();) {
View Full Code Here

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

        if (ejbUtils.isEntityBean(metadata)) {
            methods = getFinderMethods(metadata);
            for (Iterator iter = methods.iterator(); iter.hasNext();) {
                method = new DuplicatedJavaMethod((JavaMethod)iter.next());
                method.setModifiers(new String[0]);
                retVal.addMethod(method);
            }
        }
        methods = getHomeMethods(metadata);
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            method = new DuplicatedJavaMethod((JavaMethod)iter.next());
View Full Code Here

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

        }
        methods = getHomeMethods(metadata);
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            method = new DuplicatedJavaMethod((JavaMethod)iter.next());
            method.setModifiers(new String[0]);
            retVal.addMethod(method);
        }

        return new JavaClass[]{retVal};
    }
View Full Code Here

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

        Collection methods = getInterfaceMethods(metadata);
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            method = new DuplicatedJavaMethod((JavaMethod)iter.next());
            method.setModifiers(new String[0]);
            retVal.addMethod(method);
        }

        return new JavaClass[]{retVal};
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addMethod()

        addParamAnnotations(location, definitelyNullArgSet, unconditionallyDereferencedNullArgSet, propertySet, warning);

        if (bugType.equals("NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS")) {
            // Add annotations for dangerous method call targets
            for (JavaClassAndMethod dangerousCallTarget : veryDangerousCallTargetList) {
                warning.addMethod(dangerousCallTarget).describe(MethodAnnotation.METHOD_DANGEROUS_TARGET_ACTUAL_GUARANTEED_NULL);
            }
            dangerousCallTargetList.removeAll(veryDangerousCallTargetList);
            if (DEBUG_NULLARG) {
                // Add annotations for dangerous method call targets
                for (JavaClassAndMethod dangerousCallTarget : dangerousCallTargetList) {
View Full Code Here

Examples of gnu.bytecode.ClassType.addMethod()

        ClassType c = new ClassType("HelloWorld");
        c.setSuper("java.lang.Object");
        c.setModifiers(Access.PUBLIC);
        c.setSourceFile("HelloWorld.java");

        Method m = c.addMethod("<init>", "()V", Access.PUBLIC);
        CodeAttr code = m.startCode();
        code.pushScope();
        code.emitPushThis();
        code.emitInvokeSpecial(objectCtor);
        code.emitReturn();
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.