每个类定义上的注释(用粗体显示)和大部分字段定义提供了配置信息,供JAXB用于控制对象与XML的转换。
The annotations (shown in bold) on each class definition and most of the field definitions supply configuration information that JAXB USES to control the conversion of objects to and from XML.
为了决定添加什么关键字,从转换内容中访问资源对象,并将其传递给一个uml类。
To determine what keyword to add, access the source object from the transformation context and cast it to a UML Class.
在大多数情况下,返回的内容库对象的实际的类是已知的,因此可以直接进行转换。
In most instances, the actual class of the Content Store object returned will be known so it can be cast directly.
要决定添加哪个标签,在转换环境中访问源对象,并将其转换为UML类。
To determine which tag to add, access the source object from the transformation context and cast it to a UML class.
这避免了在操作类中进行复杂编码(如struts1示例所示),将表单bean转换为相关域模型对象。
This allows avoidance of complex coding in the action class (as shown in the Struts 1 example) for converting the form bean in to the related domain model object.
的URL应该转换为ProductsController类(注意,我们为类名添加了“Controller”后缀,使得这些类能够区别于设计中的模型对象)。
would translate to the ProductsController class (notice we add the "Controller" suffix to the class name to make these classes stand out in the object model at design time).
转换类型可分为三类:方法调用转换、字段访问转换和新对象转换。
These fall into three categories: method call transformations, field access transformations, and a new object transformation.
在本例中,我们的数据绑定类将转换从消息传递系统以本机格式传递到SCA应用程序中服务数据对象(SDO)的数据,对于响应消息适用相反过程。
In this case, our data Binding class transforms the data passed in the native format from a messaging system to a Service data Object (SDO) in an SCA application and vice-versa for a response message.
文本消息必须遵循特定的格式,以便转换程序类能够确定要使用的正确业务对象。
The text message must follow a specific format so that the converter class can determine the right business object to use.
在需要将一类对象转换成另一类对象时,请使用适配器模式。
Use the adapter pattern when you need to convert an object of one type to an object of another type.
要访问以类的形式存储在数组中的内容库对象,对象必须转换为它自己的类。
To access the Content store object that is stored in the array as the class expected to be returned, the object must be cast to its actual class.
如果返回的类是未知的,可能需要判断对象的类,从而执行正确的转换。
In cases where the returned class is not known, it may be necessary to determine the class of the object in order to cast it properly.
一旦找到此Mbean,代码会随后通过使用xsadmin示例应用程序中的JMXProxy类将 MBean 强制转换为代理对象。
Once this MBean is located, the code then casts the MBean into a proxy object by using the JMXProxy class from the xsadmin sample application.
如果转换器产生了一个交易类型的对象,随后处理类必须包含一个名为handle (trade trade)的方法。
If the converter produced an object of type trade, then the handler class must contain a method named handle (trade trade).
在我们的示例中,您将使用带有JMSTextMessage的类,并将其转换为业务对象。
In our case, you will use a class that takes a JMS TextMessage and converts it into a business object.
这里的关键是ObjectOut putstream类——它是实际完成将对象转换为字节流这个魔术的类。
The ObjectOutputStream class is essential here — it's what does the magic of actually turning an object into a stream of bytes.
您可以看到,强类型资源类自动将.png文件转换为能够直接加载到PictureBox中的Image对象。
You can observe that the strongly typed resource class automatically converts a.png file into an Image object that can be directly loaded into a PictureBox.
因为当转换处理UM l类时,您已经定义调用该扩展,所以您可以安全地向AbstractSyntaxTree (ast)TypeDeclaration对象输入目标对象。
Because you have defined this extension to be invoked when the transformation is processing a UML class, you can safely type the target object to an Abstract Syntax Tree (AST) TypeDeclaration object.
强类型资源类还将嵌入的XML文件转换为能够轻松加载到 XmlDocument对象中的字符串。
The strongly typed resource class also converts the embedded XML file into a string that can be easily loaded into an XmlDocument object.
当检查对象(例如清单5中的item)并把类型转换成目标类(Integer)时,类装入器会检查以下规则。
Given an object being tested (such as item in Listing 5) and a target class (Integer) being cast to, the class loader checks the following rules.
这个类提供了截图、将位图转换成各种格式、比较两个MonkeyImage对象以及写图像到文件的方法。
This class provides methods for capturing screens, converting bitmap images to various formats, comparing two MonkeyImage objects, and writing an image to a file.
模拟对象到Collaborator类型的类强制转换十分有必要,因为intercept方法将返回类型Object。
The class cast of the mock object into type Collaborator is necessary because the intercept method returns type object.
虽然此视图将代替管理数据(不知道数据会到哪里),但是它必须将文本字符串(类json格式)转换为Objective - c数据对象。
This view, will manage the data instead (it does not know where the data arrived), but it must convert the text string (JSON-like formatted) into an Objective-C data object.
类的完全限定名,该类将用于此属性所绑定到的对象的数据转换。
The fully qualified name of the class to use for data conversion for the object this attribute is bound to.
将类数组对象转换为数组对象。
除枚举数之外,所有正则表达式类都是线程安全的或者可以通过同步方法转换成线程安全对象。
With the exception of enumerators, all regular expression classes are thread safe or can be converted into thread-safe objects by a synchronized method.
如果我有一个对象的指针,转换到它的基类指针对象上,我能通过基类指针调用合适的成员函数。
If I have a pointer to an object cast to one of its base classes, I can call the correct member functions through the abstract base class.
如果我有一个对象的指针,转换到它的基类指针对象上,我能通过基类指针调用合适的成员函数。
If I have a pointer to an object cast to one of its base classes, I can call the correct member functions through the abstract base class.
应用推荐