Apache Commons BeanUtils
Apache Commons BeanUtils is a Java-based utility to provide component based architecture.
Snapshot
≈ 3 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
Apache Commons BeanUtils is a Java-based utility to provide component based architecture.[1][2][3]
Modules
edit edit sourceThe library is distributed in three jar files:
- commons-beanutils.jar - contains everything
- commons-beanutils-core.jar - excludes Bean Collections classes
- commons-beanutils-bean-collections.jar - only Bean Collections classes.[1]
Example
edit edit sourceSample code may look like as follows:
/** * Example displaying the new default behaviour such that * it is not possible to access class level properties utilizing the * BeanUtilsBean, which in turn utilizes the PropertyUtilsBean. */ public void testSuppressClassPropertyByDefault() throws Exception { final BeanUtilsBean bub = new BeanUtilsBean(); final AlphaBean bean = new AlphaBean(); try { bub.getProperty(bean, "class"); fail("Could access class property!"); } catch (final NoSuchMethodException ex) { // Ok } } /** * Example showing how by which one would use to revert to the * behaviour prior to the 1.9.4 release where class level properties were accessible by * the BeanUtilsBean and the PropertyUtilsBean. */ public void testAllowAccessToClassProperty() throws Exception { final BeanUtilsBean bub = new BeanUtilsBean(); bub.getPropertyUtils().removeBeanIntrospector(SuppressPropertiesBeanIntrospector.SUPPRESS_CLASS); final AlphaBean bean = new AlphaBean(); String result = bub.getProperty(bean, "class"); assertEquals("Class property should have been accessed", "class org.apache.commons.beanutils2.AlphaBean", result); }See also
edit edit sourceReferences
edit edit source- ^ a b c "BeanUtils – Commons". commons.apache.org. Retrieved 2019-08-20. Wikipedia revision 1341101585, retrieved 2026-11-19
- ^ Berglund, Tim; McCullough, Matthew (2011-07-13). Building and Testing with Gradle. O'Reilly Media, Inc. p. 57. ISBN 9781449304638. Wikipedia revision 1341101585, retrieved 2026-11-19
- ^ Company, Sonatype (2008-09-24). Maven: The Definitive Guide: The Definitive Guide. O'Reilly Media, Inc. p. 136. ISBN 9780596551780.
{{cite book}}:|last=has generic name (help) Wikipedia revision 1341101585, retrieved 2026-11-19
External links
edit edit source The Apache Software Foundationprojects
- Accumulo
- ActiveMQ
- Airavata
- Airflow
- Allura
- Ambari
- Ant
- Aries
- Arrow
- Apache HTTP Server
- APR
- Avro
- Axis
- Axis2
- Beam
- Bloodhound
- Brooklyn
- Calcite
- Camel
- CarbonData
- Cassandra
- Cayenne
- CloudStack
- Cordova
- CouchDB
- cTAKES
- CXF
- Derby
- Directory
- Drill
- Druid
- Empire-db
- Felix
- Flex
- Flink
- Flume
- FreeMarker
- Geronimo
- Groovy
- Guacamole
- Gump
- Hadoop
- HBase
- Helix
- Hive
- Iceberg
- Ignite
- Impala
- Jackrabbit
- James
- Jena
- JMeter
- Kafka
- Kudu
- Kylin
- Lucene
- Mahout
- Maven
- MINA
- mod_perl
- MyFaces
- Mynewt
- NiFi
- NetBeans
- Nutch
- NuttX
- OFBiz
- Oozie
- OpenEJB
- OpenJPA
- OpenNLP
- OрenOffice
- ORC
- PDFBox
- Parquet
- Phoenix
- POI
- Pig
- Pinot
- Pivot
- Qpid
- Roller
- RocketMQ
- Samza
- Shiro
- SINGA
- Sling
- Solr
- Spark
- Storm
- SpamAssassin
- Struts
- Subversion
- Superset
- SystemDS
- Tapestry
- Thrift
- Tika
- TinkerPop
- Tomcat
- Trafodion
- Traffic Server
- UIMA
- Velocity
- Wicket
- Xalan
- Xerces
- XMLBeans
- Yetus
- ZooKeeper
Text derived from https://en.wikipedia.org/w/index.php?oldid=1341101585 under CC BY-SA 4.0; modifications have been made.