Package org.codehaus.aspectwerkz.regexp

Examples of org.codehaus.aspectwerkz.regexp.FieldPattern


        assertTrue(fieldPattern.matchFieldName("MyMethod"));
        assertFalse(fieldPattern.matchFieldName("mymethod"));
    }

    public void testMatchFieldType1() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("int m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertTrue(fieldPattern.matchFieldType("int"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String"));
    }
View Full Code Here


        assertTrue(fieldPattern.matchFieldType("int"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String"));
    }

    public void testMatchFieldType2() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("* m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertTrue(fieldPattern.matchFieldType("int"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }
View Full Code Here

        assertTrue(fieldPattern.matchFieldType("int"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }

    public void testMatchFieldType3() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("java.lang.String m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }
View Full Code Here

        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }

    public void testMatchFieldType4() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("String m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }
View Full Code Here

        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }

    public void testMatchFieldType5() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("java.lang.* m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertFalse(fieldPattern.matchFieldType("java.util.List"));
        assertTrue(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }
View Full Code Here

        assertTrue(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
    }

    public void testMatchFieldType6() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("java.lang.String[] m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertFalse(fieldPattern.matchFieldType("java.util.List[]"));
        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer[]"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String[]"));
    }
View Full Code Here

        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer[]"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String[]"));
    }

    public void testMatchFieldType7() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("java.lang.String m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertTrue(fieldPattern.matchFieldType("java.lang.String"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String[]"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String[][]"));
    }
View Full Code Here

        assertFalse(fieldPattern.matchFieldType("java.lang.String[]"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String[][]"));
    }

    public void testMatchFieldType8() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("java.lang.String[][] m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        assertFalse(fieldPattern.matchFieldType("java.lang.String[]"));
        assertTrue(fieldPattern.matchFieldType("java.lang.String[][]"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String[][][]"));
    }
View Full Code Here

        assertTrue(fieldPattern.matchFieldType("java.lang.String[][]"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String[][][]"));
    }

    public void testMatchFieldType9() {
        FieldPattern fieldPattern = Pattern.compileFieldPattern("String* m_field");

        assertFalse(fieldPattern.matchFieldType(""));
        // note: abbreviation not compatible with pattern matching
        assertFalse(fieldPattern.matchFieldType("java.lang.StringBuffer"));
        assertFalse(fieldPattern.matchFieldType("java.lang.String"));
        assertTrue(fieldPattern.matchFieldType("String"));
        assertTrue(fieldPattern.matchFieldType("StringBuffer"));

    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.regexp.FieldPattern

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.