org.zodiac.actuate.health.AppNamedContributor Maven / Gradle / Ivy
package org.zodiac.actuate.health;
import org.springframework.util.Assert;
public interface AppNamedContributor {
/**
* Returns the name of the contributor.
*
* @return the contributor name
*/
String getName();
/**
* Returns the contributor instance.
*
* @return the contributor instance
*/
C getContributor();
static AppNamedContributor of(String name, C contributor) {
Assert.notNull(name, "Name must not be null");
Assert.notNull(contributor, "Contributor must not be null");
return new AppNamedContributor() {
@Override
public String getName() {
return name;
}
@Override
public C getContributor() {
return contributor;
}
};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy