【发布时间】:2013-05-13 15:43:19
【问题描述】:
我必须将 Java 应用程序中的一些类逆向工程为 UML 2 类图。到目前为止一切顺利,我已经找到了 Jon Skeet 在此处提出的如何表示整个班级的班级模板:What is the correct way to represent template classes with UML?。有了这些信息,我对这样的类进行了逆向工程:
public class Foo<T> {
//class fields and methods...
}
现在我遇到了一个两难境地,试图对一个只有一个方法包含泛型参数的类进行逆向工程:
public class OtherFoo {
public <T extends Comparable<T>> boolean bar(T x, T y) {
//fancy code goes here...
}
}
您知道如何实现任何 UML 2 工具吗?我只是想了解这个概念。
【问题讨论】:
-
+1,好问题!!!!!