/** * @return the actions of the given class. Never null. */ @Override protected Map<String, Action> inspectActions( String type ) { // TreeMap so that returns alphabetically sorted actions Map<String, Action> actions = CollectionUtils.newTreeMap( StringUtils.CASE_INSENSITIVE_COMPARATOR ); // For each action... Class<?> clazz = ClassUtils.niceForName( type ); if ( clazz == null ) { return actions; } for ( Method method : clazz.getMethods() ) { // ...that is a match... if ( !matchAction( method ) ) { continue; } // ...that is not excluded... String methodName = method.getName(); if ( isExcluded( ClassUtils.getOriginalDeclaringClass( method ), methodName, method.getReturnType() ) ) { continue; } // ...add it actions.put( methodName, new MethodAction( methodName, method ) ); } return actions; }
/** * @return the actions of the given class. Never null. */ @Override protected Map<String, Action> inspectActions( String type ) { // TreeMap so that returns alphabetically sorted actions Map<String, Action> actions = CollectionUtils.newTreeMap( StringUtils.CASE_INSENSITIVE_COMPARATOR ); // For each action... Class<?> clazz = ClassUtils.niceForName( type ); if ( clazz == null ) { return actions; } for ( Method method : clazz.getMethods() ) { // ...that is a match... if ( !matchAction( method ) ) { continue; } // ...that is not excluded... String methodName = method.getName(); if ( isExcluded( ClassUtils.getOriginalDeclaringClass( method ), methodName, method.getReturnType() ) ) { continue; } // ...add it actions.put( methodName, new MethodAction( methodName, method ) ); } return actions; }