简体   繁体   English

Eclipse是否具有JavaBeans组件的bean构建器UI?

[英]Does Eclipse have a bean builder UI for JavaBeans components?

First of all I would like to create a JavaBean. 首先,我想创建一个JavaBean。 I created a simple class "Person" in eclipse, which respects the JavaBean standard requirements, such as: 我在eclipse中创建了一个简单的类“ Person”,该类遵守JavaBean标准要​​求,例如:

  • implements Serializable 实现可序列化

  • default constructor 默认构造函数

  • private fields 私人领域

  • public getter/setter methods 公共获取/设置方法

As far as I know there are some bean builder tools, such as Netbeans etc. But does eclipse have such a plugin? 据我所知,有一些bean构建器工具,例如Netbeans等。但是eclipse有这样的插件吗? A bean builder plugin? Bean Builder插件? My purpose would be to export my class as a bean, and to use it in another classes, only for the sake of exemplification and I would like to use Eclipse if it is possible. 我的目的是将我的类导出为bean,并在另一个类中使用它,仅出于举例说明的目的,如果可能的话,我想使用Eclipse。 The problem is that I don't know how to declare/export my class as a java bean. 问题是我不知道如何将我的类声明/导出为java bean。

I believe that a JavaBean is a class as any other java class (with specific characteristics of course, but still a java class). 我相信JavaBean是与任何其他Java类一样的类(当然具有特定特征,但仍然是Java类)。 So, I think there is no special export notion for a JavaBean class, all you can do is look for the javabean.java class in your project folder and you can use it everywhere you want to. 因此,我认为JavaBean类没有特殊的导出概念,您所能做的就是在项目文件夹中查找javabean.java类,并且可以在任何需要的地方使用它。 I suggest that you try to do what I said to you. 我建议您尝试按照我对您说的做。 I hope that my answer will help you :) 希望我的回答对您有所帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM