private static void checkConstructorSource(String source) {
        String ex1 = "new" +
                "\\s+([A-Za-z0-9_$]+\\.)*[A-Za-z0-9_$]+.[A-Za-z0-9_$]+" +
                "\\(\\s*((boolean|byte|char|double|float|int|long|short|void|([A-Za-z0-9_$]+\\.)*[A-Za-z0-9_$]+)(\\[\\])?\\s*,?)*\\)\\s*";

        String ex2 = "\\s*([A-Za-z0-9_$]+\\.)*[A-Za-z0-9_$]+" +
                "\\.new" +
                "\\(\\s*((boolean|byte|char|double|float|int|long|short|void|([A-Za-z0-9_$]+\\.)*[A-Za-z0-9_$]+)(\\[\\])?\\s*,?)*\\)\\s*";

        if (!source.matches(ex1) && !source.matches(ex2)) {
            throwBadStatementException("Invalid java constructor expression: [" + source + "], " +
                    "A valid constructor expression should be [new packageName.className(paramType,paramType)" +
                    " or packageName.className.new(paramType,paramType)]");
        }
    }
This is a parser for custom aop pointcut expression.
<p>
Such as <pre>int android.util.Log.d(java.lang.String,java.lang.String)</pre>
plugin/src/main/groovy/com/didichuxing/tools/droidassist/spec/SourceSpec.java