📄 container.java
字号:
/** * Pxb IOC. * Copyright 2008 Panxiaobo. * All rights reserved. * $Id: Container.java 35 2008-08-18 11:10:07Z Panxiaobo $ */package pxb.ioc;/** * The ioc Container, use this to inject a class or an instance. it is similar * to guice * * @author Panxiaobo [pxb1988@126.com] */@ImplementedBy("pxb.ioc.impl.DefaultContainer")public interface Container{ /** * the default Inject value . (at)Inject() == (at)Inject("default") */ public String DEFAULT_NAME = "default"; /** * Inject(create) an instance of the type * * @see inject(type,"default") * @param <T> * @param type * the type * @return the instance * @throws Exception */ public <T> T inject(Class<T> type) throws Exception; /** * Inject(create) an instance of the type and the name * * @param <T> * @param type * the type * @param name * the name * @return the instance * @throws Exception */ public <T> T inject(Class<T> type, String name) throws Exception; /** * Inject an instance * * @param <T> * @param t * the Instance * @return the Injected instance * @throws Exception */ public <T> T inject(T t) throws Exception;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -