Package com.pogofish.jadt.ast

Examples of com.pogofish.jadt.ast.Doc


    @Test
    public void testDuplicateArgModifier() {
        final Checker checker = new StandardChecker();
        final Constructor constructor = new Constructor(NO_COMMENTS, "Bar", list(Arg._Arg(list(ArgModifier._Final(), ArgModifier._Final()), Type._Primitive(PrimitiveType._IntType()), "foo")));
        final DataType dataType = new DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", Util.<String>list(), NO_EXTENDS, NO_IMPLEMENTS, list(constructor));
        final Doc doc = new Doc("CheckerTest", Pkg._Pkg(NO_COMMENTS, ""), NO_IMPORTS, list(dataType));
        final List<SemanticError> errors = checker.check(doc);
        assertEquals(1, errors.size());
        assertTrue(errors.contains(_DuplicateModifier(dataType.name, constructor.name, "foo", "final")));      
    }          
View Full Code Here

TOP

Related Classes of com.pogofish.jadt.ast.Doc

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.