由于清单2中的类为参数化类型,所以类签名需要以二进制类形式表示。
Because the Listing 2 class is a parameterized type, the class signature needs to be present in the binary class representation.
由于类并非参数化类型,所以未为该类本身的二进制类表示添加任何签名。
Because the class is not a parameterized type, no signature is added to the binary class representation for the class itself.
对Win32和.NET平台来说,参数化类型也将会成为Tiburón的一部分。
Parameterized types are also going to be part of Tiburón for both the Win32 and .NET platforms.
这么做很好,但是没有真正利用到Tiger的另一项特性——泛型(有时也叫作参数化类型)。
This is nice, but doesn't really take advantage of another important Tiger feature: generics (sometimes called parameterized types).
因为编译器不能从这个方式阻止你破坏类型安全,它只能阻止你创建任何的参数化类型类型数组。
Since the compiler can't prevent you from defeating type safety in this way, it instead prevents you from creating any array of generic type.
Scala也允许在类中声明类型,正如我们在《第2章-打更少的字,做更多的事》中的“抽象类型和参数化类型”章节中所见。
Scala also allows types to be declared in classes, as we saw in the section called "Abstract types And Parameterized types" in Chapter 2, type Less, Do More.
智能:智能跟踪程序是一个参数化的类型,它与跟踪程序中的某种其他类型相映射。
Smart: The smart tracer is a parameterized type that maps to one of the other types in the tracer.
它是基于其输入和输出数据类型参数化的。
It is parameterized based on its input and output data types.
于是就有了我们最初的想法:一组消息的集合,其中每条消息都有名称,以及一组类型化的参数。
Here's our first idea: a collection of messages, where each message has a name and a list of typed parameters.
模板函数总是用完全参数化的类型指定的。
Template functions are always specified with fully parameterized types.
从属类型的标准实例是数组大小参数化的数组。
The canonical example of dependent types is that of an array type parameterized by the size of the array.
如果使用BoxImpl .make工厂实例化一个Box,您只需要指定一次类型参数。
If you instantiate a Box using the BoxImpl.make factory, you need only specify the type parameter once.
getSignatureInstance()方法实际地构建新的泛型类模板,然后为参数类型的具体列表实例化这些模板。
The getSignatureInstance() method is what actually builds new generic class templates and then instantiates these templates for specific lists of parameter types.
此方法签名包含单个松散类型化的DataObject参数,名为user,由开发人员确定运行时输入DataObject将包含哪个功能。
The method signature has a single loosely typed DataObject argument named user, and is up to the developer to know which features the input DataObject will contain at runtime.
它基于输入和输出(key,value)对的类型进行参数化。
It is parameterized based on the types of the input and output (key, value) pairs.
最后,这个数据被写到Context对象(它的write方法基于映射生成的(key,value)对的类型进行参数化)。
Finally, this data is written to the Context object (whose write method is parameterized based on the types of the (key, value) pair that are produced by map).
这里有一个名为 map的简单实现方法,该方法基于输入 (key,value)对的类型进行参数化。
There is a single method to implement called map (which is parameterized based on the types of the (key,value) pair that are the input).
从属类型是运行时值参数化的类型(与泛型比较,泛型是其它类型参数化的类型)。
Dependent types are types parameterized by run-time values (compare this with generic types, which are parameterized by other types).
然后会自动地从方法参数中推断出类型参数的实例化。
Then the type parameter instantiations would be inferred automatically from the method arguments.
因此,如果出现代码生成问题,那么最有可能的是代码生成器不能处理您的服务类中的方法参数或返回类型的序列化。
Therefore, if a code generation problem occurs, it is most likely that the code generator can not handle the serialization of the method parameters or return types in your service class.
所有者类型是一个所有者对象参数化的对象的类型。
Ownership types are types of objects that are parameterized by an owner object.
首先,可以采用与处理复杂属性相同的方法;可以将所需的多个参数序列化在一起,形成一个字符串类型的参数。
First, you can take the same approach as you did with properties; you can serialize the required arguments together into a single type of string.
方法参数和返回类型必须是可序列化的。
The method parameters and return types must be serializable.
如何定义具有数量可变的参数(每个参数的类型可能不同)的模板化类或函数?
How do you define a templated class or a function with a variable number of arguments, each with a potentially different type?
这个子接口提供了关于数组类型的信息,数组的组件类型可以是参数化的,也可以是一个类型变量。
This subinterface provides information about array types, where the component type of the array is either parameterized or a type variable.
既然类型参数被擦除为它们的界限,而界限不能是基本类型,所以一旦类型被擦除,则对基本类型的实例化会完全没有意义。
Since type parameters are erased to their bounds and the bounds can't be primitive types, there is no way that an instantiation with primitive types would make sense once the types are erased.
而在清单12中的操作则采用结构化类型作为单个粗粒度参数。
In Listing 12 the operation takes a structured type as a single coarse-grained parameter.
此外,参数和返回值必须属于GWT可以序列化的类型。
Also, your parameters and return value must be of types that GWT can serialize.
不能用基本类型实例化泛型类型参数。
Generic type parameters can't be instantiated with primitive types.
不能用基本类型实例化泛型类型参数。
Generic type parameters can't be instantiated with primitive types.
应用推荐