展开全部

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:

本回答由提问者推荐

已赞过

已踩过<

你对这个回答的评价是?

评论

收起

java beans_java beans的概念及应用?相关推荐

  1. 区分 JVM 内存结构、 Java 内存模型 以及 Java 对象模型 三个概念

    本文由 简悦 SimpRead 转码, 原文地址 https://www.toutiao.com/i6732361325244056072/ 作者:Hollis 来源:公众号Hollis Java 作 ...

  2. 高级java必须清楚的概念:原子性、可见性、有序性

    转载自 高级java必须清楚的概念:原子性.可见性.有序性 原子性.可见性.有序性是多线程编程中最重要的几个知识点,由于多线程情况复杂,如何让每个线程能看到正确的结果,这是非常重要的. 原子性 原子性 ...

  3. JAVA IO必会概念

    文章目录 JAVA IO Java定义了两个超类(抽象类): java将流分为两类:节点流与处理流: 文件流 文件输出流:java.io.FileOutputStream 文件输入流 文件复制 块读写 ...

  4. 【Java基础】基础概念与常识

    基础概念 Java的特点 JVM.JRE.JDK 字节码.使用字节码的好处 Java 源文件运行过程 为什么不全部使用AOT呢? Java -- "编译与解释并存" 生成字节码文件 ...

  5. Java的一些基本概念和它们之间的关系

    Java的一些基本概念和它们之间的关系 在CSDN中有个帖子问到下面四个问题,我估计帖子的斑竹是一个学生,他存在的问题其实困扰着很多初学java的人.这是因为,很多书上把概念都没有讲清楚.下面我把该斑 ...

  6. JMM Java内存模型的概念以及happens-before原则

    详细介绍了JMM Java内存模型的概念.由来,以及happens-before原则的具体规则. Java内存模型(Java Memory Model,JMM)是java虚拟机规范定义的一组规范以及机 ...

  7. Java注解的基本概念和原理及其简单实用

      一.注解的基本概念和原理及其简单实用 注解(Annotation)提供了一种安全的类似注释的机制,为我们在代码中添加信息提供了一种形式化得方法,使我们可以在稍后某个时刻方便的使用这些数据(通过解析 ...

  8. Java Stream流的概念

    为什么80%的码农都做不了架构师?>>>    1. Java的流分为 Inputstream 和 OutputStream: 2. 流(stream)的概念源于UNIX中管道(pi ...

  9. Java线程之核心概念

    2019独角兽企业重金招聘Python工程师标准>>> 1.线程的三个基本角色 线程是一个执行流程,它不是类,也不是对象.我们先来梳理一下线程的三个基本角色: Runnable接口: ...

最新文章

  1. htmljavascript 事件触发机制
  2. 合肥python培训-合肥Python测试开发全栈核心课程
  3. C++ VS2017 QT5.12开发在xp环境下运行 [2019]亲测推荐
  4. Spring入门 IOC
  5. JAVA基础——编程练习(二)
  6. 开始学习ZendFramework框架了
  7. 解释http和html,解释HTTP、HTML的含义
  8. TensorFlow windows安装
  9. 安卓原生系统_小米新机曝光,运行原生安卓系统;准!四川宜宾5.3级地震提前14秒预警...
  10. python 爬取全本免费小说网的小说
  11. 【C/C++】C++运算符优先级
  12. ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  13. linux内核奇遇记之md源代码解读之七阵列同步一
  14. 通过kmeans分析出租车数据并调用百度API进行可视化!
  15. 吉利嘉际车机安装第三方软件教程(2022年更新)
  16. php 资深面试题,高级php程序员面试题
  17. 联邦学习:FedProx框架
  18. 更适合运动的耳机,设计时尚轻巧好用,南卡Runner CC3上手
  19. 剑指offeⅤ(Java 持续更新...)
  20. 从南沙图书馆到故宫博物院,隐藏着怎样的未来世界?

热门文章

  1. 01_Nginx安装,nginx下部署项目,nginx.conf配置文件修改,相关文件配置
  2. 17_Android中Broadcast详解(有序广播,无序广播)最终广播,Bundle传递参数,传递参数的时候指定权限
  3. nc65语义模型设计_文本匹配方法系列––多维度语义交互匹配模型
  4. TensorRT(2)-基本使用:mnist手写体识别
  5. Altium_Designer-PCB的覆铜步骤
  6. 《使用Nessus进行渗透测试》- 简介
  7. defer与async的认识
  8. 【Oracle认证必读】常见问题解答
  9. 如何调优JVM - 优化Java虚拟机(大全+实例)
  10. FP-growth算法高效发现频繁项集