Package org.codehaus.aspectwerkz.regexp

Examples of org.codehaus.aspectwerkz.regexp.MethodPattern


        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

        assertTrue(methodPattern.matchMethodName("alsdkfj"));
        assertFalse(methodPattern.matchMethodName(""));
    }

    public void testMatchMethodName4() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* *th*()");
        assertTrue(methodPattern.matchMethodName("method"));
        assertTrue(methodPattern.matchMethodName("methods"));
        assertFalse(methodPattern.matchMethodName("sadlfkj"));
        assertFalse(methodPattern.matchMethodName(""));
    }
View Full Code Here

        assertFalse(methodPattern.matchMethodName("sadlfkj"));
        assertFalse(methodPattern.matchMethodName(""));
    }

    public void testMatchMethodName5() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* A()");
        assertTrue(methodPattern.matchMethodName("A"));
        assertFalse(methodPattern.matchMethodName("a"));
        assertFalse(methodPattern.matchMethodName("B"));
        assertFalse(methodPattern.matchMethodName(""));
    }
View Full Code Here

        assertFalse(methodPattern.matchMethodName("B"));
        assertFalse(methodPattern.matchMethodName(""));
    }

    public void testMatchMethodName6() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* m_method()");
        assertTrue(methodPattern.matchMethodName("m_method"));
        assertFalse(methodPattern.matchMethodName("m"));
        assertFalse(methodPattern.matchMethodName("m_methods"));
        assertFalse(methodPattern.matchMethodName(""));
    }
View Full Code Here

        assertFalse(methodPattern.matchMethodName("m_methods"));
        assertFalse(methodPattern.matchMethodName(""));
    }

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

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

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

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

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

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

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

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

    public void testMatchParameterTypes5() {
        MethodPattern methodPattern = Pattern.compileMethodPattern("* method(*,String)");
        assertTrue(methodPattern.matchParameterTypes(new String[]{"java.lang.String", "java.lang.String"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{"java.lang.String"}));
        assertFalse(methodPattern.matchParameterTypes(new String[]{}));
    }
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.