Package com.thoughtworks.qdox.parser.structs

Examples of com.thoughtworks.qdox.parser.structs.MethodDef


        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "MyClass";
        mth.constructor = true;
        mth.exceptions.add("SomeException");

        builder.addExpectedAddMethodValues(mth);
View Full Code Here


        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "MyClass";
        mth.constructor = true;
        mth.exceptions.add("SomeException");
        mth.exceptions.add("java.io.IOException");
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expect no the method, and it shouldn't be static.
        MethodDef method = new MethodDef();
        method.name = "doStuff";
        method.returns = "void";
        builder.addExpectedAddMethodValues(method);

        // execute
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "count";
        mth.returns = "int";
        mth.dimensions = 0;

        builder.addExpectedAddMethodValues(mth);
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "count";
        mth.returns = "int";
        mth.dimensions = 1;

        builder.addExpectedAddMethodValues(mth);
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "count";
        mth.returns = "int";
        mth.dimensions = 1;

        builder.addExpectedAddMethodValues(mth);
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "count";
        mth.returns = "int";
        mth.dimensions = 1;
        FieldDef p1 = new FieldDef();
        p1.name = "p1";
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "count";
        mth.returns = "int";
        mth.dimensions = 0;
        FieldDef p1 = new FieldDef();
        p1.name = "p1";
View Full Code Here

        setupLex(Parser.BRACECLOSE);
        setupLex(0);

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "count";
        mth.returns = "int";
        mth.dimensions = 1;
        FieldDef p1 = new FieldDef();
        p1.name = "p1";
View Full Code Here

        assertEquals("public", modifiers[1]);
    }

    public void testAddMethodsToCorrectClass() throws Exception {
        builder.beginClass(new ClassDef());
        builder.addMethod(new MethodDef());
        builder.endClass();

        builder.beginClass(new ClassDef());
        builder.addMethod(new MethodDef());
        builder.addMethod(new MethodDef());
        builder.addMethod(new MethodDef());
        builder.endClass();

        builder.beginClass(new ClassDef());
        builder.addMethod(new MethodDef());
        builder.addMethod(new MethodDef());
        builder.endClass();

        JavaSource source = builder.getSource();
        assertEquals(1, source.getClasses()[0].getMethods().length);
        assertEquals(3, source.getClasses()[1].getMethods().length);
View Full Code Here

TOP

Related Classes of com.thoughtworks.qdox.parser.structs.MethodDef

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.