java beans_java beans的概念及应用?-程序员宅基地

技术标签: java beans  

展开全部

The JavaBeans architecture is based on a component model which enables developers to create software units called components. Components are self-contained, reusable software units that can be visually assembled into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as beans.

A set of APIs describes a component model for a particular language. The JavaBeans API specificationdescribes the core detailed elaboration for the JavaBeans component architecture.

Beans are dynamic in that they can be changed or customized. Through the design mode of a builder tool you can use the Properties window of the bean to customize the bean and then save (persist) your beans using visual manupulation. You can select a bean from the toolbox, drop it into a form, modify its appearance and behavior, define its interaction with other beans, and combine it and other beans into an applet, application, or a new bean.

The following list briefly describes key bean concepts.

Builder tools discover a bean's features (that is, its properties, methods, and events) by a process known as introspection. Beans support introspection in two ways:

By adhering to specific rules, known as design patterns, when naming bean features. The Introspector class examines beans for these design patterns to discover bean features. The Introspector class relies on the core reflection API. The trail The Reflection API is an excellent place to learn about reflection.

By explicitly providing property, method, and event information with a related bean information class. A bean information class implements the BeanInfo interface. A BeanInfo class explicitly lists those bean features that are to be exposed to application builder tools.

Properties are the appearance and behavior characteristics of a bean that can be changed at design time. Builder tools introspect on a bean to discover its properties and expose those properties for manipulation.

Beans expose properties so they can be customized at design time. Customization is supported in two ways: by using property editors, or by using more sophisticated bean customizers.

Beans use events to communicate with other beans. A bean that is to receive events (a listener bean) registers with the bean that fires the event (a source bean). Builder tools can examine a bean and determine which events that bean can fire (send) and which it can handle (receive).

Persistence enables beans to save and restore their state. After changing a bean's properties, you can save the state of the bean and restore that bean at a later time with the property changes intact. The JavaBeans architecture uses Java Object Serialization to support persistence.

A bean's methods are no different from Java methods, and can be called from other beans or a scripting environment. By default all public methods are exported.

Beans vary in functionality and purpose. You have probably met some of the following beans in your programming practice:

本回答由提问者推荐

2Q==

已赞过

已踩过<

你对这个回答的评价是?

评论

收起

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_39667080/article/details/114400830

智能推荐

1024 分辨率下最快模型,字节跳动文生图开放模型 SDXL-Lightning 发布_sdxllightning下载-程序员宅基地

文章浏览阅读1k次,点赞28次,收藏25次。很高兴跟大家分享我们最新的文生图模型 —— SDXL-Lightning,它实现了前所未有的速度和质量,并且已经向社区开放。_sdxllightning下载

关于cloacked-pixel的一些总结_03-cloacked-pixel-程序员宅基地

文章浏览阅读1.5k次,点赞2次,收藏2次。前两天遇到一道lsb隐写的题目,需要用到cloacked-pixel这个脚本。工具地址下载后解压即可,这里需要注意,该脚本是基于python2的!但我电脑anaconda里面只有python3并没有很好的python基础,但借助anaconda可以轻松解决很多问题!教程如下:anaconda中添加python2但是在运行脚本时还会提示缺库(注意运行时要activate pythonXX手动切换到你所配置的python2环境下)继续使用anaconda为python2装缺少的._03-cloacked-pixel

WPF DataGrid添加右键菜单-程序员宅基地

文章浏览阅读2k次,点赞2次,收藏2次。原文http://home.cnblogs.com/group/topic/54788.html用代码添加:View Code <DataGrid.ContextMenu> <ContextMenu Name="dgmenu1" StaysOpen="true"> &..._wpf datagrid右键菜单

EB Tresos Studio离线激活方法_ebtresos离线激活-程序员宅基地

文章浏览阅读1.9k次,点赞2次,收藏6次。EB Tresos Studio离线激活方法_ebtresos离线激活

B端系统-权限管理_如何将后台管理系统b端化-程序员宅基地

文章浏览阅读95次。当然用户组是可以拓展的,部门和职位常用在内部的管理系统,如果是面向c端的系统,比如淘宝网的商家,商家自身也有一套组织架构,如采购部,销售部,客服部,后勤部,有些人拥有客服权限,有些人拥有上架权限等,这就体现了用户组的扩展性。关于数据权限的处理,常见的有两种方式,一种是在角色内完成数据权限的定义,另一种是将角色和权限分开,两种方式各有偏重。即页面的功能按钮,包括查看,新增,修改,删除,审核等,用户点击删除按钮时,后台会校验用户角色下用户的所有权限是否包含该删除权限,如果是,就可以下一步,反之提示无权限。_如何将后台管理系统b端化

音乐节拍提取一-程序员宅基地

文章浏览阅读601次。前段时间倒腾了一下音乐节拍数检测,参考下面的网上的一个测试歌曲列表做了下对比,效果还不错,基本上都是准的。Itunes LinkNameTimeArtistBPMAlbumGenreAmazon LinkLoneliest Soul03:35Grace Potter and the Nocturnals168The Lion The Bea..._提取音乐节奏

随便推点

win11实时字幕无法下载问题_微软实时字幕下载不了-程序员宅基地

文章浏览阅读776次。一直卡着的话直接去Microsoft Store下载这个试试看。_微软实时字幕下载不了

如何让谷歌Chrome地址栏恢复显示“www”和“https://”标识符_chrome 地址显示原始-程序员宅基地

文章浏览阅读1.1w次。如何让谷歌Chrome地址栏恢复显示“www”和“https://”标识符地址栏隐藏“www”和“https://”标识符  谷歌 Chrome 现在默认在所有网站地址栏中少了一些内容,“www”子域和“https://”被隐藏起来了,因为谷歌认为这些不是大多数人要关注的信息。  Chrome 的产品经理 Emily Schechter 说,他们将开始从桌面版和 Android 版的第..._chrome 地址显示原始

目标跟踪数据集整理(四)----TColor-128(Temple Color 128)_encoding color information for visual tracking: al-程序员宅基地

文章浏览阅读3.5k次。文章目录Encoding Color Information for Visual Tracking:Algorithms and Benchmark 2015官网 下载数据集(4.4G)本文认为颜色信息可以提供丰富的判别线索对于视觉推理,大多数现代视觉跟踪器限制在灰度域。(也就是主要解决输入序列是灰度版本)因此我们在算法和基准两方面做了系统的研究,证明了颜色信息可以帮助提升视觉跟踪效果。..._encoding color information for visual tracking: algorithms and benchmark

论文解读--Visual Lane Tracking and Prediction for Autonomous Vehicles-程序员宅基地

文章浏览阅读860次,点赞20次,收藏21次。我们提出了一种用于自动驾驶汽车跟踪水平道路车道标记位置的可视化方法。我们的方法是基于预测滤波的。预测步骤估计在每个新的图像帧中期望的车道标记位置。它也是基于汽车的运动学模型和嵌入式测程传感器产生的信息。使用适当准备的测试车辆获得的实验结果表明,在某些条件下,如振荡和变道,预测步骤可以显著地减少跟踪误差。因此,我们相信我们的方法应用于基于图像的控制自动驾驶汽车可以提高系统性能。

sap 标准委外和工序委外_委外加工SAP的两种典型委外处理方法-程序员宅基地

文章浏览阅读1.2k次。通常提供两种基本处理方式:外包采购和工序外包。生产外包经营方式简介生产外包作为一种全新的生产经营方式,改善了传统方式的不足,主要类型有:一.OEM:(OrignalEquipmentManufactuce->原始设备制造商)典型的OEM方式为:拥有原始设备的OEM加工方(受委托方)按照委托方的要求,用自己的设备为其加工生产产品,而后贴上委托方商标交货,整个活动中,加工方只获得加工费用,自..._工序委外加工属于什么变更类型

yolov3算法详解_2020年阿里-算法工程师面经-程序员宅基地

文章浏览阅读432次。写在前面:暑期实习从申请到拿到阿里意向书大概持续了1个月的时间,和周围其他同学比较,我的面试流程算走的比较快的了。还没有拿到意向书的朋友们也不要太着急,调整好心态好好准备(虽然内心多多少少会有些焦虑),阿里走流程算是比较快的了。希望能对求职的你有所帮助。【阿里云1面(算法实习生)】1、自我介绍、项目介绍2、死锁出现的原因以及如何避免雾夜飞鹰:死锁产生的原因及四个必要条件​zhuanlan.zhih..._yolo模型的时间复杂度