use of com.tvd12.ezyhttp.server.core.annotation.ComponentsScan in project ezyhttp by youngmonkeys.
the class ApplicationContextBuilder method addComponentClass.
public ApplicationContextBuilder addComponentClass(Class<?> componentClass) {
ComponentsScan componentsScan = componentClass.getAnnotation(ComponentsScan.class);
if (componentsScan != null) {
scan(componentsScan.value().length != 0 ? componentsScan.value() : new String[] { componentClass.getPackage().getName() });
}
EzyPackagesToScan packagesToScan = componentClass.getAnnotation(EzyPackagesToScan.class);
if (packagesToScan != null) {
scan(packagesToScan.value().length != 0 ? packagesToScan.value() : new String[] { componentClass.getPackage().getName() });
}
ComponentClasses componentClasses = componentClass.getAnnotation(ComponentClasses.class);
if (componentClasses != null) {
addComponentClasses(componentClasses.value());
}
PropertiesSources propertiesSources = componentClass.getAnnotation(PropertiesSources.class);
if (propertiesSources != null) {
addPropertiesSources(propertiesSources.value());
}
this.componentClasses.add(componentClass);
return this;
}
Aggregations