/** * Create a new AbstractControllerContext. * * @param name the name * @param aliases the aliases * @param actions the actions * @param dependencies the dependencies * @param target the target */ public AbstractControllerContext(Object name, Set<Object> aliases, ControllerContextActions actions, DependencyInfo dependencies, Object target) { if (name == null) throw new IllegalArgumentException("Null name"); if (actions == null) throw new IllegalArgumentException("Null actions"); this.name = name; this.actions = actions; if (dependencies == null) this.dependencies = new AbstractDependencyInfo(); else this.dependencies = dependencies; this.target = target; setAliases(aliases); initScopeInfo(); }
/** * Create an abstract controller context * * @param info the bean info * @param metaData the meta data * @param target any target object */ public AbstractKernelControllerContext(BeanInfo info, BeanMetaData metaData, Object target) { super(metaData.getName(), determineAliases(metaData), target == null ? actions : noInstantiate, new AbstractDependencyInfo(), target); this.info = info; this.metaData = metaData; ControllerMode mode = metaData.getMode(); if (mode != null) setMode(mode); ErrorHandlingMode errorHandlingMode = metaData.getErrorHandlingMode(); if (errorHandlingMode != null) setErrorHandlingMode(errorHandlingMode); boolean autowireCandidate = metaData.isAutowireCandidate(); getDependencyInfo().setAutowireCandidate(autowireCandidate); if (System.getSecurityManager() != null) accessContext = AccessController.getContext(); initKernelScopeInfo(); }