Package com.thoughtworks.qdox.parser.structs

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


    public void testJavaDocOnMethod() throws Exception {
        builder.beginClass(new ClassDef());

        builder.addJavaDoc("Hello");
        builder.addMethod(new MethodDef());
        builder.endClass();

        JavaSource source = builder.getSource();

        assertNull(source.getClasses()[0].getComment());
View Full Code Here


        builder.beginClass(new ClassDef());

        builder.addField(new FieldDef());// f0

        builder.addJavaDoc("Hello");
        builder.addMethod(new MethodDef());//m0

        builder.addJavaDoc("Hello field");
        builder.addField(new FieldDef());//f1

        builder.addMethod(new MethodDef());//m1

        builder.addJavaDoc("World");
        builder.addMethod(new MethodDef());//m2

        builder.endClass();

        JavaSource source = builder.getSource();
View Full Code Here

        builder.addJavaDocTag(new TagDef("cheese", "is good"));
        builder.beginClass(new ClassDef());

        builder.addJavaDoc("");
        builder.addJavaDocTag(new TagDef("food", "is great"));
        builder.addMethod(new MethodDef());

        builder.addJavaDoc("");
        builder.addJavaDocTag(new TagDef("chairs", "are boring"));
        builder.addField(new FieldDef());
        builder.endClass();
View Full Code Here

        ClassDef classDef = new ClassDef();
        classDef.name = "hello";
        assertTrue(classDef.hashCode() > 0);

        MethodDef methodDef = new MethodDef();
        methodDef.name = "hello";
        assertTrue(methodDef.hashCode() > 0);

        FieldDef fieldDef = new FieldDef();
        fieldDef.name = "hello";
        assertTrue(fieldDef.hashCode() > 0);
View Full Code Here

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

        // expectations
        MethodDef mth = new MethodDef();
        mth.name = "doStuff";
        mth.returns = "void";
        FieldDef p1 = new FieldDef();
        p1.name = "stuff";
        p1.type = "int";
View Full Code Here

        addModifiers( fieldDef.modifiers, field.getModifiers());
        binaryBuilder.addField(fieldDef);
    }

    private void addMethodOrConstructor(Member member, ModelBuilder binaryBuilder) {
        MethodDef methodDef = new MethodDef();
        // The name of constructors are qualified. Need to strip it.
        // This will work for regular methods too, since -1 + 1 = 0
        int lastDot = member.getName().lastIndexOf('.');
        methodDef.name = member.getName().substring(lastDot + 1);
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.