Java 类org.springframework.boot.actuate.endpoint.annotation.Endpoint 实例源码

项目:sshd-shell-spring-boot    文件:EndpointCommand.java   
@Autowired
EndpointCommand(ApplicationContext appCtx) {
    appCtx.getBeansWithAnnotation(Endpoint.class).entrySet().stream().forEachOrdered(entry -> {
        log.info("{} : {}", entry.getKey(), entry.getValue().getClass().getName());
        for (Method m : entry.getValue().getClass().getDeclaredMethods()) {
            if (m.isAnnotationPresent(ReadOperation.class) || m.isAnnotationPresent(WriteOperation.class)) {
                log.info("\tOp: {}", m.getName());
                for (Parameter p : m.getParameters()) {
                    log.info("\t\tParameter {}, {}", p.getName(), p.getType().getName());
                }
            }
        }
    });
}