然后,编译器可以根据age属性声明的类型实施类型检查。
The compiler can then enforce type checking based on the declared type of the attribute named age.
正如您所料,默认值的类型必须与成员变量声明的类型完全相同。
As you might expect, this must be the same type that you declared for the member variable.
要在实例文档中对元素指定xsi:type,使用派生类型替换声明的类型。
Xsi: type is specified on an element in the instance document to replace the declared type with a derived one.
在客户端和服务器之间传递的参数和结果类型可以包括在组件的存储模型中声明的类型。
The parameter and result types that pass between client and server can include types declared in the component's storage model.
这必须与MBean描述符文件中声明的类型相匹配,在我们的示例中,它是Voter。
This must match the type declared in the MBean descriptor file which, in our example, is Voter .
指定的type必须派生于声明的类型或称为xs:error的特殊简单类型定义(没有有效实例)。
The type specified must be derived from the declared type or a special simple type definition called xs: error (which has no valid instances).
如果test属性上的XPath表达式最终值为true,那么将选择指定的type替换元素中声明的类型。
If the XPath expression on the test attribute has evaluated to true, then the specified type is selected as a substitution for the one declared on the element.
如果编辑器或者验证过程发现引用的主体不是已声明的类型(或者已声明类型的专门化),处理程序就会报告错误。
When an editor or validating process follows the reference, and the referenced topic doesn't have the declared type (or a specialization from the declared type), the processor reports an error.
下面的示例演示一个库,该库包含一个错误地在命名空间外进行声明的类型,以及一个在命名空间内声明的同名类型。
The following example shows a library that has a type incorrectly declared outside a namespace, and a type that has the same name declared in a namespace.
在XMLSchema 1.1中,元素声明的类型表中可以包含一个类型替换组件序列和一个默认类型定义(也是一个类型替换)。
In XML Schema 1.1, element declarations can have a type table which contains a sequence of type alternative components and a default type definition (which is also a type alternative).
实际上,数据中有什么类型并不是问题,您只需为声明选择好正确的类型就可以了。
It doesn't matter what types are in the array — you just choose the right type for your declaration.
这就是说,开发人员可以自由地声明这些类型的变量和参数。
What this means is that developers are free to declare variables and parameters of these types.
让我们来看一些需要显式声明方法返回类型的例子。
Let's look at examples where explicit declarations of method return types are required.
值得仔细查看一下文档类型声明的内容。
The document type declaration contents are worth looking at in detail.
在创建变量时,需要声明变量的类型,然后才能使用该变量。
When you create a variable, you need to declare what type it is before you can use it.
最值得注意的是,这些声明里的类型跟在变量名的后面。
Most notably, the type in these declarations comes after the variable name.
将执行验证以确保元素名称是正确的,并且对元素执行的方法使用了声明的元素类型。
Validation is performed to ensure that element names are correct, and that methods performed on elements use the declared element type.
让我们来仔细探索一下这些可见性选项。为了简单,我们会使用字段来作为成员的例子。方法,类型声明的行为和字段是一致的。
Let's explore these visibility options in more detail. To keep things simple, we'll use fields for member examples. Method and type declarations behave the same way.
参见代码清单1中的类型声明ResourceAdapterInfo。
See the ResourceAdapterInfo type declaration in code Listing 1.
Clojure是动态类型—在编译时,无需声明或了解特定类型的对象。
Clojure is dynamically typed - the specific types of objects do not need to be declared, or known, at compile time.
清单2显示ConnectionFactoryInfo的类型声明。
Listing 2 shows the type declaration for ConnectionFactoryInfo.
在BGGA方案中,可以声明function类型的变量、方法参数和方法返回值。
In the BGGA proposal, you can declare variables, method arguments, and method return values that are function types.
这里是Scala的声明,使用了类型信息的推断。
Here's the same declaration rewritten in Scala, with inferred type information.
所有其他受影响的连接点都显示了相同的结构(例如,受类型间声明影响的类型,以及受通知影响的调用站点。)
All other affected join points show the same structure (for example, types affected by inter-type declarations and call sites affected by advice).
注意到这两个名称空间声明在指定的uri类型上的区别吗?
Did you notice another difference between these namespace declarations, beyond the type of URI specified?
然后遍历元素声明的代替链或类型层次结构,以决定元素声明是否满足代替或类型衍生要求。
They then traverse a substitution chain of element declarations or a type hierarchy to determine whether the element declaration satisfies the substitution or type derivation requirements.
其他类型的公共成员声明是可见的,因此在理论上可能增加目标类型的复杂性。
Public members declared on other types are visible so they can add to the theoretical complexity of the target type.
这样,通过声明这种类型的变量,可以直接把构造函数调用的结果分配给对应的变量。
Thus, by declaring the variables with this type, you can directly assign the result of a constructor call to the corresponding variable.
在我们的示例中,这是一个简单的声明,消息的主体是来自类型部分的架构的特殊元素。
In our example, this is a simple statement that the body of the message is a particular element from the schema in the types section.
隐式类型系统一个较大的优点是,不需要为函数的参数声明类型,因为编译器会从传入的值推断出参数的类型。
One big advantage of type-inferred systems is that you don't need to declare the types of arguments to a function because the compiler infers them from the parameters you pass in.
应用推荐