在Delphi中嵌套属性(续) [英] Nested Attributes in Delphi (Continued)

查看:137
本文介绍了在Delphi中嵌套属性(续)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题指的是在此之前 之一在这里张贴在SO通过的基督教梅茨勒

This question refers to this prior one posted here on SO by Christian Metzler.

我就只annotion非常有限的经验,包括使用CustomAttribute在最近版本的Delphi介绍。

My only very limited experience regarding annotion consists of using CustomAttribute introduced in recent Delphi versions.

我的问题:


  • 是否有实现嵌套属性功能(注释目的)任何其他语言。

推荐答案

的Java 编程语言,它可以声明嵌套的注释类型。

In the Java programming language it is possible to declare nested annotation types.

例引用:

http://javahowto.blogspot.com/ 2006/07 / Java的注释与 - 无target.html上

http://www.trevorpounds.com/blog/?p=314

下面是从 javax.persistence.EntityResult文档,与3个不同层次的嵌套3注释:

Here is an example from the javax.persistence.EntityResult docs, with 3 nested annotations at 3 different levels:

@SqlResultSetMapping(name="OrderResults",
 entities={
     @EntityResult(entityClass=com.acme.Order.class, fields={
         @FieldResult(name="id", column="order_id"),
         @FieldResult(name="quantity", column="order_quantity"),
         @FieldResult(name="item", column="order_item")})},
 columns={
     @ColumnResult(name="item_name")}
)

这篇关于在Delphi中嵌套属性(续)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆