beothorn/javaflame

Add function filter

Closed this issue · 1 comments

For example, I want only entries for JdbcConnection.prepareCommand

        private DynamicType.Builder<?> getBuilder(
            DynamicType.Builder<?> builder,
            TypeDescription typeDescription
        ) {
            log(DEBUG, "Transform '"+ typeDescription.getCanonicalName()+"'");
            System.out.println("Transform '"+ typeDescription.getCanonicalName()+"'");
            ElementMatcher.Junction<MethodDescription> matcher = isMethod();
            if(noConstructorMode){
                matcher = matcher.and(not(isConstructor()));
            }
            if(typeDescription.getCanonicalName().equals("com.github.beothorn.sorts.algorithms.InplaceQuickSort")){
                matcher = matcher.and(nameContains("findNextValueSmallerOrEqualThanPivotOnRight"));
            }
            //findNextValueSmallerOrEqualThanPivotOnRight

            return builder.visit(advice.on(matcher));
        }
    }

and filter looks like:

// I need a character that I know will not conflict with the command line to replace #

filter:com.github.beothorn.sorts.algorithms.InplaceQuickSort#findNextValueSmallerOrEqualThanPivotOnRight

maybe:

filter:com.github.beothorn.sorts.algorithms.InplaceQuickSort:findNextValueSmallerOrEqualThanPivotOnRight

This will filter only for this package, docs and exampĺes must be clear