类的实例化使用函数符号。只要将类对象看作是一个返回新的类实例的无参数函数即可。例如(假设沿用前面的类)。
Class instantiation USES function notation. Just pretend that the class object is a parameterless function that returns a new instance of the class. For example (assuming the above class).
如果您没有提供一个无参数构造函数的话,那么这是您给对象添加一些状态的最后机会!
If you haven't provided a no-argument one, this is your last chance to add some state to the object!
因此,您永远都不该为一个不可变类提供一个无参数的构造函数。
Thus, you should never have a no-argument constructor for an immutable class.
不要提供一个无参数的构造函数。
如果您正在使用的框架因为某些原因需要使用这样的构造函数的话,那么您可以了解以下能否通过提供一个私有的无参数构造函数(这是经由反射可见的)来满足这一要求。
If you're using a framework that requires this for some reason, see if you can satisfy it by providing a private no-argument constructor (which is visible via reflection).
您从参数中得到的是一个对“this”对象的引用(this用于对象方法,对类似bar这样的无参数的老式函数来说是NULL)和一个存储在args中的参数元组。
What you get in your arguments are a reference to the "this" object (this is for object methods and is NULL for plain old functions like bar ) and an argument tuple in args.
按照推理,如果您用SOAPMappingRegistry的无参数构造函数对它进行实例化,将返回一个具有2001名称空间意识的实例。
As a corollary, if you instantiate SOAPMappingRegistry with its no-arg constructor, a 2001 namespace-aware instance is returned.
然后,对于一般结构的全局优化问题,我们给出了一个新的无参数的填充函数方法。
Then, we consider a new filled function method with parameter free for solving general global optimization problems.
你想调用一个无参数的函数,但是你不想使用括号。
You want to call a function that takes no arguments, but don't want to use parentheses.
涡轮螺桨发动机的无因次性能参数是三个变量的函数。
The"non dimensional"engine performance parameter of turbo propsis a function of three variables.
编译器只是加入代码使得在每次函数被无参数调用的时候传递一个默认的值。
The compiler simply inserts code to pass the default value whenever the function is called without an argument in that position.
默认构造函数调用父类的无参数构造函数。
The default constructor invoked the no - arg constructor of the superclass.
类x的默认构造函数是指可以被无参数调用的X的构造函数。
A default constructor for a class X is a constructor of class X that can be called without an argument.
当一个类是反序列化的,超类的无参数构造函数运行。
The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.
提供的类型必须公开泛型类型可以访问的无参数构造函数。
The supplied type must expose a parameterless constructor that your generic type can access.
当一个类是反序列化的,超类的无参数构造函数运行。
When a subclass is DE - serialized, the no-argument Constructor of the super class will run.
基于这个定义,提出了一类无参数的F—C函数。
Based on the definition, a class of parameter - free F- C function is proposed.
构造了一种无参数罚函数,并用这种无参数罚函数方法求解约束最优控制问题,最后举例以说明.。
The method of parameter-free penalty function is discussed and used here to solve the constrained optimal control problem; Finally an example is cited in illustration of the theory…
讨论了实时线程和无堆实时线程的构造函数的实现语法和各个参数代表的意义,还给出了实时线程的一些主要方法。
It discussed the syntax of the constructors of the RealTimethread and the NoHeapRealTimethread and discussed each parameter 's meaning of the constructor and gave some methods of the RealTimethread.
讨论了实时线程和无堆实时线程的构造函数的实现语法和各个参数代表的意义,还给出了实时线程的一些主要方法。
It discussed the syntax of the constructors of the RealTimethread and the NoHeapRealTimethread and discussed each parameter 's meaning of the constructor and gave some methods of the RealTimethread.
应用推荐