private List<RegisteredAction> createActionsFromJavaClass(RegisteredApi api, Class<?> actionClass) {
assert api != null;
assert actionClass != null;
DirectAction actionAnnotation = actionClass.getAnnotation(DirectAction.class);
List<String> actionNames = new ArrayList<String>();
if( actionAnnotation != null ) {
Collections.addAll( actionNames, actionAnnotation.action() );
}
if( actionNames.isEmpty()) {
actionNames.add( ClassUtils.getSimpleName(actionClass) );
}