All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.firefly.core.ApplicationContext Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.core;

import com.firefly.utils.lang.LifeCycle;

import java.util.Collection;
import java.util.Map;

public interface ApplicationContext extends LifeCycle {

    /**
     * Get a bean by type
     *
     * @param clazz Bean's class object
     * @param    Bean's type
     * @return The managed bean
     */
     T getBean(Class clazz);

    /**
     * Get a bean by id
     *
     * @param id  Bean's id
     * @param  Bean type
     * @return The managed bean
     */
     T getBean(String id);

    /**
     * Get all beans by type
     *
     * @param clazz Bean's class object
     * @param    Bean type
     * @return All beans are derived from type
     */
     Collection getBeans(Class clazz);

    /**
     * Get all managed beans
     *
     * @return The unmodifiable map of all beans
     */
    Map getBeanMap();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy