//这是startuml 把uml 转换成的java代码: public class Circle implements Ishape { private double _radius; public double getArea() { } public double getArea(); } public class Pizza implements Ishape { private double price; private Ishape _shape; public double get
c#的Attribute有些类似java中的annotation,可以方便地在类成员中做修饰/限制作用. Demo: class ss { public stat BsonDocument Iterator(object obj){ MyAttr currAttr = null;// 自定义注解类 Type type = obj.GetType();// obj为传入的对象参数 //获取类名 String className = type.Name; //获取所有公有属性 PropertyInf