📄 factorymanager.java
字号:
package xyz.frame.factory;import xyz.frame.LogicRequest;import xyz.frame.component.InvalidComponentException;import xyz.frame.introspector.Introspector;/** * Responsible for dealing with factories * * @author Guilherme Silveira */public interface FactoryManager { /** * Instatiates an object based on a key by first instantiating the factory, * injecting what is needed and then calling the create method * * @param key * factory key * @param context * logic context * @return the new object * @exception FactoryException * if unable to instantiate such key (key does not exist or * some internal exception) */ public Object instantiate(String key, LogicRequest context, Introspector introspector) throws FactoryException; /** * Whether this factory can deal with this key * * @param key * key * @return true or false */ public boolean canInstantiate(String key); /** * Registers a factory * * @param clazz * the class * @throws InvalidComponentException * invalid factory if some of it's methods are invalid */ public void register(Class clazz) throws InvalidFactoryException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -