Package org.codehaus.janino.util

Examples of org.codehaus.janino.util.StringPattern


     */
    public static void main(String[] args) {
        int idx = 0;

        StringPattern[] directoryNamePatterns = StringPattern.PATTERNS_ALL;
        StringPattern[] fileNamePatterns = new StringPattern[] { new StringPattern("*.java") };
        File[]          classPath = new File[] { new File(".") };
        File[]          optionalExtDirs = null;
        File[]          optionalBootClassPath = null;
        String          optionalCharacterEncoding = null;
        boolean         verbose = false;
View Full Code Here


    public interface MethodInvocationAction {
        void execute(UnitCompiler uc, Java.Invocation invocation, IClass.IMethod method) throws Exception;
    }

    static boolean typeMatches(String pattern, String typeName) {
        return new StringPattern(pattern).matches(
            pattern.indexOf('.') == -1
            ? typeName.substring(typeName.lastIndexOf('.') + 1)
            : typeName
        );
    }
View Full Code Here

                if (!typeMatches(
                    this.optionalClassNamePattern,
                    Descriptor.toClassName(method.getDeclaringIClass().getDescriptor())
                )) return;
            }
            if (!new StringPattern(this.methodNamePattern).matches(method.getName())) return;
            IClass[] fpts = method.getParameterTypes();
            if (this.optionalArgumentTypeNamePatterns != null) {
                String[] atnps = this.optionalArgumentTypeNamePatterns;
                if (atnps.length != fpts.length) return;
                for (int i = 0; i < atnps.length; ++i) {
                    if (!new StringPattern(atnps[i]).matches(Descriptor.toClassName(fpts[i].getDescriptor())));
                }
            }
            for (Iterator it = this.predicates.iterator(); it.hasNext();) {
                MethodInvocationPredicate mip = (MethodInvocationPredicate) it.next();
                try {
View Full Code Here

TOP

Related Classes of org.codehaus.janino.util.StringPattern

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.