com.github.datalking.beans.factory.BeanFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of play-mvc Show documentation
Show all versions of play-mvc Show documentation
simple mvc framework based on java servlet.
The newest version!
package com.github.datalking.beans.factory;
/**
* BeanFactory 根接口
*/
public interface BeanFactory {
// FactoryBean自身实例的名称前缀
String FACTORY_BEAN_PREFIX = "&";
// 可以用别名查找
Object getBean(String name);
Class> getType(String name);
// 检查name对应的bean是否是targetType的类型
boolean isTypeMatch(String name, Class> targetType);
// boolean isPrototype(String name) ;
// boolean isSingleton(String name) ;
//类型可以是接口或者子类,但不能是null
// T getBean(Class requiredType) throws Exception;
// T getBean(String name, Class requiredType) throws Exception;
//不管类是否抽象类,懒加载,是否在容器范围内,只要符合都返回true,所以这边true,不一定能从getBean获取实例
boolean containsBean(String name);
// String[] getAliases(String name);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy