Dependency injection can occur in a variety of ways, for example, via a setter method or a class variable.
依赖性的引入可以以多种方式出现,例如,通过设置属性值的方法或者类变量。
Take a look at the dependency graph for a typical setup of a component with two dependencies and the method parameters used (see Figure 1).
请看下图,这是典型的组件设置的依赖关系图,其中有两个依赖关系并使用了方法参数(参见图1)。
Architectural metrics (dependency level, fan in, fan out, and ext user) measure the complexity of relationships such as method calls, inheritance, or variable usage.
架构度量(依赖层、聚集、分散和外部用户)衡量关系的复杂性,比如方法调用,继承或变量使用。
Dependency injection can occur in a variety of ways, such as through a setter method or a class variable.
依赖项注入可以通过多种方式进行,例如通过setter方法或类变量。
Spring supports three types of dependency injection — setter, constructor, and method injection — but overall, the prevailing model is setter injection.
Spring支持三种依赖注入——setter、构造函数和方法注入——但总的来说,最流行的模型是setter注入。
Unity is a lightweight, extensible dependency injection container with support for constructor, property, and method call injection.
Unity是一个轻量级,可扩展的依赖注入容器,支持构造函数,属性和方法调用注入。
The said annotation is placed above the method that instantiates the bean and sets the dependency.
上述注释位于实例化bean并设置依赖项的方法上方。
Using interfaces as method parameters is (in IoC terms) a form of context IoC, applied on a dependency of the caller.
使用接口作为方法参数是上下文IoC的一种形式(这是ioc术语),应用于调用程序的依赖项。
In both cases you need to declare the dependency (e.g. using the Spring configuration file) and add a corresponding constructor or mutator method to the dependent object class.
在这两种情况下,您都需要声明依赖项(例如使用Spring配置文件),并向依赖对象类添加对应的构造函数或mutator方法。
Then, you use the marshaller object (which was instantiated by Spring's dependency injection) to invoke the marshal method. This method requires two parameters.
首先,您获得一个指向simplebean . xml的对象,然后,您使用编组器对象(通过Spring的依赖项注入实例化)调用marshal方法。
The dependency methods define the method parameters as interfaces.
依赖项方法将方法参数定义成接口。
The deps dependency task, as defined in Listing 1, includes all of the libraries in my lib directory using the dir class and glob method.
根据清单1中的定义,deps依赖任务使用Dir类和glob方法包括lib目录中的所有库。
This leaves us with other method of dependency injection, called setting injection, which involves creating a public method inside the object for the dependencies that need injection.
这就给我们留下其他的方法进行依赖注入,称为设置注入,包含在需要注入依赖的对象里创建一个公共方法。
First, let's explore why dependency injection is beneficial. Consider the following class and method.
首先来看看我们为何要使用依赖注入,它能带来什么好处。考虑下列代码。
This paper gives a availability method based on Dependency -matrix that can find all primary attributes and get primary key.
就这类问题的子类给出了一种通过依赖矩阵求出全部主属性的方法,进而得出主关键字。
A data recovery method based on fuzzy dependency was proposed to meet the request in real-time application.
提出了一种基于模糊依赖的数据恢复方法用以满足实时应用的要求。
This paper presents a method for dynamically building dependency models in distributed environments.
本文提出了一种为分布式应用动态构造依赖性模型的方法。
Due to complexity of modeling workflow and problems of secure access control, a method that makes a workflow model by setting up task nodes, route nodes and their dependency is brought forward.
针对工作流建模的复杂性和模型的安全存取控制问题,提出一种通过建立任务节点和路由节点及其依赖关系来创建工作流模型的方法。
To solve this problem, a component optimization design method based on stability dependency was presented.
为此,提出了一种基于稳定依赖的构件优化设计方法。
The method relies on active perturbation to the system to obtain prior knowledge for building the model, and then constructs the dependency model based on the methods of building Bayesian networks.
这个方法通过对系统进行主动干扰来获得建模的先验知识,然后基于贝叶斯网络构造方法,对分布式应用的组件间关系建立依赖性模型。
In this paper, a method of constructing corresponding dependency graphs is provided according to the alarm correlation relation of network objects.
为此给出了依据网络对象间的告警关联关系构建相应网络依赖图的方法。
Type 2 or setter injection, in which the dependent module exposes a setter method which the framework USES to inject the dependency.
类型2设置器注入,使用者暴露一个设置器方法,框架将使用此方法注入依赖项。
Based on the analysis of the reason and the mechanism of this sequence dependency problem, the paper proposes a sequence independent formular as an improvement for the method.
本文从理论上分析了连环替代法替代顺序依赖性的原因并提出了一个改进的算法。
In the paper, in order to solve the implication of XML function dependency, a path coding method of DTD is presented, and its characters are analyzed.
为了有效地解决XML函数依赖的蕴涵问题,该文提出了一种DTD路径编码机制,对它的性质进行了分析。
Language model; Long distance dependency; dependency syntax tree; Max entropy method.
语言模型;长距离依赖;依存句法树;最大熵策略!
In this paper the nature of the join dependency is analyzed. and its causing conditions and processing method are presented.
剖析了连接依赖的本质,并提出其产生的条件和处理的方法。
A method for judging the dependency of classifying variable was applied to analyzing factors in typhoon and rainstorm process to broadcast the rainstorm process.
本文把衡量分类变量关联性的方法应用于台风暴雨过程的因子分析,进而对暴雨过程进行预报。
A method for judging the dependency of classifying variable was applied to analyzing factors in typhoon and rainstorm process to broadcast the rainstorm process.
本文把衡量分类变量关联性的方法应用于台风暴雨过程的因子分析,进而对暴雨过程进行预报。
应用推荐