Package com.pogofish.jadt.parser

Examples of com.pogofish.jadt.parser.ParserImpl.annotation()


        testAnnotation(_Tuple(NO_COMMENTS, _Annotation("foo", _Some(_ElementValuePairs(list(_AnnotationKeyValue("x", _AnnotationValueExpression(_LiteralExpression(_NullLiteral()))), _AnnotationKeyValue("y", _AnnotationValueAnnotation(_Annotation("bar", Optional.<AnnotationElement>_None())))))))), "@foo( x = null, y = @bar )");       
    }
   
    private void testAnnotation(Tuple<List<JavaComment>, Annotation> expected, String input) throws Exception {
        final ParserImpl p = parserImpl(input);
        final Tuple<List<JavaComment>, Annotation> ca = p.annotation(true);
        assertEquals("[]", p.errors().toString());
        assertEquals(expected.toString(), ca.toString());
    }
}
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.