@Test public void getProcessApplicationNameFromContext_beanName() throws Exception { assumeAnnotatedBeans(Variables.putValue("app2", new NoName())); assertThat(function.apply(Optional.empty())).isEqualTo(Optional.of("app2")); }
@Override public Optional<String> apply(Optional<String> springApplicationName) { Optional<String> processApplicationName = GetProcessApplicationNameFromAnnotation.getProcessApplicationName.apply(applicationContext); if (processApplicationName.isPresent()) { return processApplicationName; } else if (springApplicationName.isPresent()) { return springApplicationName; } return Optional.empty(); }
GetProcessApplicationNameFromAnnotation implements Supplier<Optional<String>>, UnaryOperator<Optional<String>> { @Override public Optional<String> apply(Optional<String> springApplicationName) { Optional<String> processApplicationName = GetProcessApplicationNameFromAnnotation.getProcessApplicationName.apply(applicationContext); if (processApplicationName.isPresent()) { return processApplicationName; } else if (springApplicationName.isPresent()) { return springApplicationName; } return Optional.empty(); } }
GetProcessApplicationNameFromAnnotation implements Supplier<Optional<String>>, UnaryOperator<Optional<String>> { @Override public Optional<String> apply(Optional<String> springApplicationName) { Optional<String> processApplicationName = GetProcessApplicationNameFromAnnotation.getProcessApplicationName.apply(applicationContext); if (processApplicationName.isPresent()) { return processApplicationName; } else if (springApplicationName.isPresent()) { return springApplicationName; } return Optional.empty(); } private  GetProcessApplicationNameFromAnnotation(final ApplicationContext applicationContext); }
GetProcessApplicationNameFromAnnotation implements Supplier<Optional<String>>, UnaryOperator<Optional<String>> { @Override public Optional<String> apply(Optional<String> springApplicationName) { Optional<String> processApplicationName = GetProcessApplicationNameFromAnnotation.getProcessApplicationName.apply(applicationContext); if (processApplicationName.isPresent()) { return processApplicationName; } else if (springApplicationName.isPresent()) { return springApplicationName; } return Optional.empty(); } private  GetProcessApplicationNameFromAnnotation(final ApplicationContext applicationContext); static GetProcessApplicationNameFromAnnotation processApplicationNameFromAnnotation(final ApplicationContext applicationContext); @Override Optional<String> get(); @Override Optional<String> apply(Optional<String> springApplicationName); }
GetProcessApplicationNameFromAnnotation implements Supplier<Optional<String>>, UnaryOperator<Optional<String>> { @Override public Optional<String> apply(Optional<String> springApplicationName) { Optional<String> processApplicationName = GetProcessApplicationNameFromAnnotation.getProcessApplicationName.apply(applicationContext); if (processApplicationName.isPresent()) { return processApplicationName; } else if (springApplicationName.isPresent()) { return springApplicationName; } return Optional.empty(); } private  GetProcessApplicationNameFromAnnotation(final ApplicationContext applicationContext); static GetProcessApplicationNameFromAnnotation processApplicationNameFromAnnotation(final ApplicationContext applicationContext); @Override Optional<String> get(); @Override Optional<String> apply(Optional<String> springApplicationName); static Function<ApplicationContext, Optional<AnnotatedBean>> getAnnotatedBean; static Function<EnableProcessApplication, Optional<String>> getAnnotationValue; static Function<AnnotatedBean, String> getName; static Function<ApplicationContext, Optional<String>> getProcessApplicationName; }