private List<MethodNode> findMacroMethods(String methodName, List<Expression> callArguments) {
        List<MethodNode> methods = MacroMethodsCache.get(classLoader).get(methodName);

        if (methods == null) {
            // Not a macro call
            return Collections.emptyList();
        }

        ClassNode[] argumentsList = new ClassNode[callArguments.size()];

        for (int i = 0; i < callArguments.size(); i++) {
            argumentsList[i] = ClassHelper.make(callArguments.get(i).getClass());
        }

        return StaticTypeCheckingSupport.chooseBestMethod(MACRO_CONTEXT_CLASS_NODE, methods, argumentsList);
    }
private List < MethodNode > findMacroMethods ( String methodName , List < Expression > callArguments ) { List < MethodNode > methods = MacroMethodsCache . get ( classLoader ) . get ( methodName ) ; if ( methods == null ) { return Collections . emptyList ( ) ; } ClassNode [ ] argumentsList = new ClassNode [ callArguments . size ( ) ] ; for ( int i = 0 ; i < callArguments . size ( ) ; i ++ ) { argumentsList [ i ] = ClassHelper . make ( callArguments . get ( i ) . getClass ( ) ) ; } return StaticTypeCheckingSupport . chooseBestMethod ( MACRO_CONTEXT_CLASS_NODE , methods , argumentsList ) ; }
Finds all extension methods of {@link MacroContext} for given methodName
with @{@link org.codehaus.groovy.macro.runtime.Macro} annotation.