类 NkCustomObjectManager

java.lang.Object
cn.nkpro.elcube.co.NkCustomObjectManager
所有已实现的接口:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component public class NkCustomObjectManager extends Object implements org.springframework.context.ApplicationContextAware
自定义对象管理类 它是Spring上下文工厂的代理,由于系统支持多上下文的原因,所有运行时对象从Spring Context中获取时,不能直接调用 BeanFactory.getBean(String) 等一系列方法。 多上下文的目的是为了不同的用户可以调试不同的配置及脚本,参考DebugContextManager 当然了,这个类也做了一些Bean是否存在的基础校验,省去了很多null指针判断的麻烦 Created by bean on 2020/7/24.
  • 构造器详细资料

    • NkCustomObjectManager

      public NkCustomObjectManager()
  • 方法详细资料

    • getCustomObjects

      public <T extends NkCustomObject> Map<String,​T> getCustomObjects(Class<T> clazz)
    • getCustomObjectDescriptionList

      public List<NkCustomObjectDesc> getCustomObjectDescriptionList(Class<? extends NkCustomObject> clazz, boolean emptyValue, Predicate<Map.Entry<String,​? extends NkCustomObject>> predicate)
    • getCustomObject

      public <T extends NkCustomObject> T getCustomObject(String beanName, Class<T> clazz)
    • getCustomObjectIfExists

      public <T extends NkCustomObject> T getCustomObjectIfExists(String beanName, Class<T> clazz)
    • assertExists

      public void assertExists(String beanName)
    • setApplicationContext

      public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      指定者:
      setApplicationContext 在接口中 org.springframework.context.ApplicationContextAware
      抛出:
      org.springframework.beans.BeansException