Package org.codehaus.aspectwerkz.regexp

Examples of org.codehaus.aspectwerkz.regexp.MethodPattern


        assertFalse(methodPattern.matchParameterTypes(
                new String[]{"java.lang.String[][][]"}));
    }

    public void testMatchParameterTypes11() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method(java.*.*[])");
        assertTrue(methodPattern.matchParameterTypes(
                new String[]{"java.lang.String[]"}));
        assertTrue(methodPattern.matchParameterTypes(
                new String[]{"java.util.List[]"}));
        assertFalse(methodPattern.matchParameterTypes(
                new String[]{"java.util.List[][]"}));
    }
View Full Code Here


        assertFalse(methodPattern.matchParameterTypes(
                new String[]{"java.util.List[][]"}));
    }

    public void testMatchParameterTypes12() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method(java.lang.String*)");
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.String"}));
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.StringBuffer"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.String", "int"}));
    }
View Full Code Here

        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.String", "int"}));
    }

    public void testMatchParameterTypes13() {
        //AW-91
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method(..)");
        assertTrue(methodPattern.matchParameterTypes(new String[]{}));
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[]"}));
        assertTrue(methodPattern.matchParameterTypes(new String[]{"int[]"}));
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[][]"}));
        assertTrue(methodPattern.matchParameterTypes(new String[]{"int[][]"}));
    }
View Full Code Here

        assertTrue(methodPattern.matchParameterTypes(new String[]{"int[][]"}));
    }

    public void testMatchParameterType14() {
        //AW-91
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method(java.lang.Integer*)");
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[]"}));
    }
View Full Code Here

        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[]"}));
    }

    public void testMatchParameterType15() {
        //AW-91
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method(Integer[])");
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[]"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer"}));

        methodPattern = Pattern.compileMethodPattern("* method(Integer[][])");
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[][]"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[]"}));
    }
View Full Code Here

        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.Integer[]"}));
    }

    public void testMatchReturnType1() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method()");
        assertTrue(methodPattern.matchReturnType("int"));
        assertTrue(methodPattern.matchReturnType("java.lang.String"));
        assertTrue(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }
View Full Code Here

        assertTrue(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }

    public void testMatchReturnType2() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("String method()");
        assertFalse(methodPattern.matchReturnType("int"));
        assertTrue(methodPattern.matchReturnType("java.lang.String"));
        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }
View Full Code Here

        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }

    public void testMatchReturnType3() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("java.lang.String method()");

        assertFalse(methodPattern.matchReturnType("int"));
        assertTrue(methodPattern.matchReturnType("java.lang.String"));
        assertFalse(methodPattern.matchReturnType("java.foo.String"));
        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }
View Full Code Here

        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }

    public void testMatchReturnType4() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("java.lang.* method()");

        assertFalse(methodPattern.matchReturnType("int"));
        assertTrue(methodPattern.matchReturnType("java.lang.String"));
        assertTrue(methodPattern.matchReturnType("java.lang.StringBuffer"));
        assertTrue(methodPattern.matchReturnType("java.lang.Bar"));
        assertFalse(methodPattern.matchReturnType("java.foo.String"));
        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }
View Full Code Here

        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }

    public void testMatchReturnType5() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("void method()");

        assertFalse(methodPattern.matchReturnType("int"));
        assertTrue(methodPattern.matchReturnType("void"));
        assertFalse(methodPattern.matchReturnType("java.foo.String"));
        assertFalse(methodPattern.matchReturnType("String"));
        assertFalse(methodPattern.matchReturnType(""));
    }
View Full Code Here

TOP

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

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.