Examples of AnnotationCommentParser


Examples of com.dubture.doctrine.annotation.parser.AnnotationCommentParser

        String comment = "/**\r\n" +
"     * @Route(\"/hello/{name}\", name=null, requierements={\"name\" = \"\\+\"})\r\n" +
"     * @Template()\r\n" +
"     */";

        AnnotationCommentParser parser = new AnnotationCommentParser();
        parser.setIncludedClassNames(new String[]{"Template"});

        List<Annotation> annotations = parser.parse(comment, 1568);

        assertEquals(2, annotations.size());

        Annotation annotation = annotations.get(0);
        assertEquals("", annotation.getNamespace());
View Full Code Here

Examples of com.dubture.doctrine.annotation.parser.AnnotationCommentParser

    protected List<Annotation> getCommentAnnotations(String comment) {
        return getCommentAnnotations(comment, 0);
    }

    protected List<Annotation> getCommentAnnotations(String comment, int commentOffset) {
        AnnotationCommentParser parser = new AnnotationCommentParser();

        return parser.parse(comment, commentOffset);
    }
View Full Code Here

Examples of com.dubture.doctrine.annotation.parser.AnnotationCommentParser

            excludedClassNames.add("return");
            excludedClassNames.add("author");
            excludedClassNames.add("var");
        }

        AnnotationCommentParser parser = new AnnotationCommentParser(excludedClassNames);

        return parser.parse(comment, commentOffset);
    }
View Full Code Here

Examples of com.dubture.doctrine.annotation.parser.AnnotationCommentParser

     * @param includedClassNames The class names to includes, can be null
     *
     * @return A default {@link AnnotationCommentParser} set to include only the classes specified
     */
    public static AnnotationCommentParser createParser(String[] includedClassNames) {
        AnnotationCommentParser parser = new AnnotationCommentParser();
        parser.addExcludedClassNames(PHPDocTagStrategy.PHPDOC_TAGS);
        parser.addExcludedClassNames(PHPDOC_TAGS_EXTRA);
        if (includedClassNames != null) {
            parser.addIncludedClassNames(includedClassNames);
        }

        return parser;
    }
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.