Search in sources :

Example 1 with EzyPackagesToScan

use of com.tvd12.ezyfox.annotation.EzyPackagesToScan 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;
}
Also used : EzyPackagesToScan(com.tvd12.ezyfox.annotation.EzyPackagesToScan) ComponentClasses(com.tvd12.ezyhttp.server.core.annotation.ComponentClasses) PropertiesSources(com.tvd12.ezyhttp.server.core.annotation.PropertiesSources) ComponentsScan(com.tvd12.ezyhttp.server.core.annotation.ComponentsScan)

Aggregations

EzyPackagesToScan (com.tvd12.ezyfox.annotation.EzyPackagesToScan)1 ComponentClasses (com.tvd12.ezyhttp.server.core.annotation.ComponentClasses)1 ComponentsScan (com.tvd12.ezyhttp.server.core.annotation.ComponentsScan)1 PropertiesSources (com.tvd12.ezyhttp.server.core.annotation.PropertiesSources)1