Editing any generic class declaration.
编辑任何泛型类声明。
Create a generic class for outputting VXML form elements.
创建输出VXML表单元素的通用类。
A static factory method on a generic or a non-generic class?
一个静态的泛型和非泛型类工厂方法?
You can access a generic class indirectly using a nongeneric base interface.
您可以使用非泛型基接口间接访问泛型类。
Sometimes we want to restrict the potential type instantiations of a generic class.
有时我们想限制可能出现的泛型类的类型实例化。
When you compile a generic class, MSIL contains placeholders for each parameterized type.
当你编译一个范型类时,MSIL为每一个参数化的类型预留了空间。
Place an upper limit on the number of instantiations of a generic class that a program can make.
对程序可以产生的泛型类的实例化数目设置上限。
By creating a generic class, you can create a collection that is type-safe at compile-time.
通过创建泛型类,您可以创建一个在编译时类型安全的集合。
The Services_Trackback package: Download this generic class for sending and receiving trackbacks.
Services _ trackback包:下载这个通用类,使用它发送和接收trackback。
For example, in a generic class List, do you really want to prevent the construction of a List?
例如,在泛型类List中,您真的想要防止List的构造吗?
We could put an upper limit on the number of instantiations of a generic class that a program can make.
我们对程序可以产生的泛型类的实例化数目设置上限。
Let's start with a simple generic class, a value container called Box, which holds a value of known type.
让我们从一个简单的泛型类开始(一个称为Box的值容器),它持有一个具有已知类型的值。
Throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
只要泛型类的运行时实例化没有包括所需的构造函数,就抛出异常。
This generic class handles pairs of values, with the type parameters giving the types of the items in the pairs.
这个泛型类处理成对的值,类型参数给出了这些对中项目的类型。
Then, inside the generic class definition, the only constructors that could be called are those declared in the bound.
因而,在泛型类定义内部,唯一可调用的构造函数是那些在界限中声明的构造函数。
It USES the class name Date, which is a fairly generic class name and could very well exist in other places in our code.
它使用类名Date,这是一个非常通用的类名,并且可以很好地切入到代码中的其他位置。
The problem here is that since the XPathHandler is a generic class, it does not know about the actual application handler.
现在的问题是,由于XPathHandler是一个一般类,所以它不知道实际的应用处理程序。
For example, if you know that your generic class is intended for use only with reference types, apply the class constraint.
例如,如果您知道您的泛型类仅用于引用类型,则应用类约束。
Wildcards play an important role in the type system; they provide a useful type bound for the family of types specified by a generic class.
通配符在类型系统中具有重要的意义,它们为一个泛型类所指定的类型集合提供了一个有用的类型范围。
This hash map associates the field descriptor string for a generic class without any parameter types to the GenericTemplate for that class.
这个哈希映射把没有参数类型的泛型类的字段描述符字符串与这个类的GenericTemplate关联起来。
Polymorphic recursion occurs when a generic class instantiates itself in its own body. For example, consider the following devious example.
当泛型类在其自己的主体中实例化其本身时,发生多态递归。
Also, client classes that instantiate our generic class must do so with classes that meet the declared constraint on what constructors exist.
同样,实例化泛型类的客户机类必须使用满足对构造函数存在所声明的约束的类来这样做。
Thus, when a type parameter t is used as the superclass of a generic class, the annotation on t tells us exactly what super-constructors we can call.
因此,当类型参数t用作泛型类的超类时,T的注释确切地告知我们可以调用哪些超级构造函数。
While there are subclasses of InitialContext that are specific to directory operations, such as InitialDirContext, the generic class will do the job.
尽管有一些特定于目录操作的initialcontext子类(如initialdircontext),但通用类将完成此任务。
Just as the type parameters of a generic class are wrapped in Angle brackets, the arguments of a generic type application are wrapped in Angle brackets as well.
就像泛型类的类型参数用尖括号括起来那样,泛型类型应用程序的参数也是用尖括号括起来的。
Another way of handling this problem would be to throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
处理该问题的另一种方法是:只要泛型类的运行时实例化没有包括所需构造函数,就抛出异常。
The getSignatureInstance() method is what actually builds new generic class templates and then instantiates these templates for specific lists of parameter types.
getSignatureInstance()方法实际地构建新的泛型类模板,然后为参数类型的具体列表实例化这些模板。
The rules for type parameters and constraints have several implications for generic class behavior, especially regarding inheritance and member accessibility.
型别参数和条件约束的规则有几个泛型类别行为含意,尤其与继承和成员存取范围有关。
When you define a generic class, you can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates your class.
在定义泛型类时,可以对客户端代码能够在实例化类时用于类型参数的类型种类施加限制。
By allowing you to specify types that are acted on by a generic class or method, the generics feature shifts the burden of type safety from you to the compiler.
通过允许指定泛型类或方法操作的类型,泛型功能将类型安全的任务从您转移给了编译器。
应用推荐