jbossesb 4.7

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Natural Language Processing
51.Net
52.Parser
53.PDF
54.Portal
55.Profiler
56.Project Management
57.Report
58.RSS RDF
59.Rule Engine
60.Science
61.Scripting
62.Search Engine
63.Security
64.Sevlet Container
65.Source Control
66.Swing Library
67.Template Engine
68.Test Coverage
69.Testing
70.UML
71.Web Crawler
72.Web Framework
73.Web Mail
74.Web Server
75.Web Services
76.Web Services apache cxf 2.2.6
77.Web Services AXIS2
78.Wiki Engine
79.Workflow Engines
80.XML
81.XML UI
Java Source Code / Java Documentation  » JBoss » jbossesb 4.7 
JBoss ESB
License:LGPL
URL:http://labs.jboss.com/jbossesb/
Description:
Package NameComment
edu.umd.cs.findbugs.formatStringChecker
javax.annotation
javax.annotation.concurrent
javax.annotation.meta
jxxload_help
org.hamcrest

The stable API defining Matcher and its associated interfaces and classes. Hamcrest sub-projects define their convenience classes in the org.hamcrest package.

org.hamcrest.core

Fundamental matchers of objects and values, and composite matchers.

org.hamcrest.internal
org.jboss.ant
org.jboss.esb.ordwebservice
org.jboss.ftp
org.jboss.internal.soa.esb.addressing.eprs
org.jboss.internal.soa.esb.addressing.helpers
org.jboss.internal.soa.esb.assertion
org.jboss.internal.soa.esb.command
org.jboss.internal.soa.esb.couriers
org.jboss.internal.soa.esb.couriers.helpers
org.jboss.internal.soa.esb.couriers.tests
org.jboss.internal.soa.esb.couriers.transport
org.jboss.internal.soa.esb.couriers.tx
org.jboss.internal.soa.esb.dependencies
org.jboss.internal.soa.esb.listeners.gateway.filefilter
org.jboss.internal.soa.esb.listeners.war
org.jboss.internal.soa.esb.message
org.jboss.internal.soa.esb.message.filter
org.jboss.internal.soa.esb.message.format
org.jboss.internal.soa.esb.message.format.serialized
org.jboss.internal.soa.esb.message.format.serialized.body.content
org.jboss.internal.soa.esb.message.format.xml
org.jboss.internal.soa.esb.message.format.xml.body.content
org.jboss.internal.soa.esb.message.format.xml.marshal
org.jboss.internal.soa.esb.message.urigen
org.jboss.internal.soa.esb.notification
org.jboss.internal.soa.esb.parameters
org.jboss.internal.soa.esb.persistence.format
org.jboss.internal.soa.esb.persistence.format.db
org.jboss.internal.soa.esb.persistence.format.jcr
org.jboss.internal.soa.esb.persistence.manager
org.jboss.internal.soa.esb.publish
org.jboss.internal.soa.esb.registry.client
org.jboss.internal.soa.esb.registry.server
org.jboss.internal.soa.esb.remoting
org.jboss.internal.soa.esb.rosetta.pooling
org.jboss.internal.soa.esb.rosetta.pooling.jms
org.jboss.internal.soa.esb.services.registry
org.jboss.internal.soa.esb.services.registry.aspect
org.jboss.internal.soa.esb.services.routing.cbr
org.jboss.internal.soa.esb.services.rules
org.jboss.internal.soa.esb.services.rules.util
org.jboss.internal.soa.esb.services.security
org.jboss.internal.soa.esb.soap
org.jboss.internal.soa.esb.soap.wise
org.jboss.internal.soa.esb.soap.ws
org.jboss.internal.soa.esb.util
org.jboss.internal.soa.esb.util.embedded
org.jboss.internal.soa.esb.util.embedded.ftp
org.jboss.internal.soa.esb.util.stax
org.jboss.internal.soa.esb.webservice
org.jboss.soa.esb
org.jboss.soa.esb.actions
org.jboss.soa.esb.actions.aggregation
org.jboss.soa.esb.actions.cbr
org.jboss.soa.esb.actions.cbr.regex
org.jboss.soa.esb.actions.cbr.xpath
org.jboss.soa.esb.actions.converters
org.jboss.soa.esb.actions.converters.xstream.conf
org.jboss.soa.esb.actions.monitoring
org.jboss.soa.esb.actions.naming
org.jboss.soa.esb.actions.naming.strategy
org.jboss.soa.esb.actions.routing
org.jboss.soa.esb.actions.routing.email
org.jboss.soa.esb.actions.routing.http
org.jboss.soa.esb.actions.scripting
org.jboss.soa.esb.actions.smooks
org.jboss.soa.esb.actions.soap
org.jboss.soa.esb.actions.soap.adapter
org.jboss.soa.esb.actions.soap.beans
org.jboss.soa.esb.actions.soap.proxy
org.jboss.soa.esb.actions.soap.request
org.jboss.soa.esb.actions.soap.wise
org.jboss.soa.esb.actions.spring
org.jboss.soa.esb.actions.templates
org.jboss.soa.esb.actions.templating
org.jboss.soa.esb.actions.transformation.xslt
org.jboss.soa.esb.actions.validation
org.jboss.soa.esb.addressing
org.jboss.soa.esb.addressing.eprs
org.jboss.soa.esb.addressing.eprs.tests
org.jboss.soa.esb.addressing.helpers.tests
org.jboss.soa.esb.addressing.tests
org.jboss.soa.esb.addressing.util
org.jboss.soa.esb.addressing.util.tests
org.jboss.soa.esb.client
org.jboss.soa.esb.command
org.jboss.soa.esb.common
org.jboss.soa.esb.common.tests
org.jboss.soa.esb.common.tests.propertymanager
org.jboss.soa.esb.common.tests.utils
org.jboss.soa.esb.couriers
org.jboss.soa.esb.dom
org.jboss.soa.esb.dvdstore
org.jboss.soa.esb.epr
org.jboss.soa.esb.example
org.jboss.soa.esb.example.highprice
org.jboss.soa.esb.filter
org.jboss.soa.esb.helpers
org.jboss.soa.esb.helpers.persist
org.jboss.soa.esb.http
org.jboss.soa.esb.http.configurators
org.jboss.soa.esb.http.mock
org.jboss.soa.esb.http.protocol
org.jboss.soa.esb.jms
org.jboss.soa.esb.lifecycle
org.jboss.soa.esb.listeners
org.jboss.soa.esb.listeners.config
org.jboss.soa.esb.listeners.config.JBESB_539
org.jboss.soa.esb.listeners.config.mappers
org.jboss.soa.esb.listeners.config.mappers110
org.jboss.soa.esb.listeners.config.mappers120
org.jboss.soa.esb.listeners.config.model
org.jboss.soa.esb.listeners.deployers.mc
org.jboss.soa.esb.listeners.deployers.mc.util
org.jboss.soa.esb.listeners.gateway
org.jboss.soa.esb.listeners.gateway.http
org.jboss.soa.esb.listeners.gateway.mina
org.jboss.soa.esb.listeners.gateway.remotestrategies
org.jboss.soa.esb.listeners.gateway.remotestrategies.cache
org.jboss.soa.esb.listeners.ha
org.jboss.soa.esb.listeners.jca
org.jboss.soa.esb.listeners.lifecycle
org.jboss.soa.esb.listeners.message
org.jboss.soa.esb.listeners.message.errors
org.jboss.soa.esb.message
org.jboss.soa.esb.message.body.content
org.jboss.soa.esb.message.fault
org.jboss.soa.esb.message.format
org.jboss.soa.esb.message.format.tests
org.jboss.soa.esb.message.helper.content
org.jboss.soa.esb.message.mapping
org.jboss.soa.esb.message.payload
org.jboss.soa.esb.message.properties
org.jboss.soa.esb.message.tests
org.jboss.soa.esb.message.urigen
org.jboss.soa.esb.message.util
org.jboss.soa.esb.messagestore
org.jboss.soa.esb.mock
org.jboss.soa.esb.notification
org.jboss.soa.esb.notification.jms
org.jboss.soa.esb.oracle.aq
org.jboss.soa.esb.parameters
org.jboss.soa.esb.persistence.actions
org.jboss.soa.esb.persistence.manager
org.jboss.soa.esb.persistence.tests
org.jboss.soa.esb.quickstart.test
org.jboss.soa.esb.registry.rmi
org.jboss.soa.esb.rosetta.pooling
org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter
org.jboss.soa.esb.samples.https.client
org.jboss.soa.esb.samples.https.server
org.jboss.soa.esb.samples.https.test
org.jboss.soa.esb.samples.quickstart.aggregator
org.jboss.soa.esb.samples.quickstart.aggregator.test
org.jboss.soa.esb.samples.quickstart.businessrules
org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore
org.jboss.soa.esb.samples.quickstart.businessrules.test
org.jboss.soa.esb.samples.quickstart.businessrulesstateful
org.jboss.soa.esb.samples.quickstart.businessrulesstateful.dvdstore
org.jboss.soa.esb.samples.quickstart.businessrulesstateful.test
org.jboss.soa.esb.samples.quickstart.businessservice
org.jboss.soa.esb.samples.quickstart.businessservice.test
org.jboss.soa.esb.samples.quickstart.customaction
org.jboss.soa.esb.samples.quickstart.customaction.test
org.jboss.soa.esb.samples.quickstart.deadletter
org.jboss.soa.esb.samples.quickstart.deadletter.test
org.jboss.soa.esb.samples.quickstart.dynamicRouter
org.jboss.soa.esb.samples.quickstart.dynamicRouter.test
org.jboss.soa.esb.samples.quickstart.ejbprocessor
org.jboss.soa.esb.samples.quickstart.ejbprocessor.test
org.jboss.soa.esb.samples.quickstart.exceptions
org.jboss.soa.esb.samples.quickstart.exceptions.test
org.jboss.soa.esb.samples.quickstart.funcbr
org.jboss.soa.esb.samples.quickstart.funcbr.test
org.jboss.soa.esb.samples.quickstart.groovygateway
org.jboss.soa.esb.samples.quickstart.helloworld
org.jboss.soa.esb.samples.quickstart.helloworld.test
org.jboss.soa.esb.samples.quickstart.helloworldaction
org.jboss.soa.esb.samples.quickstart.helloworldaction.test
org.jboss.soa.esb.samples.quickstart.helloworldfileaction
org.jboss.soa.esb.samples.quickstart.helloworldfileaction.test
org.jboss.soa.esb.samples.quickstart.helloworldfilenotifier
org.jboss.soa.esb.samples.quickstart.helloworldfilenotifier.test
org.jboss.soa.esb.samples.quickstart.helloworldftpaction
org.jboss.soa.esb.samples.quickstart.helloworldftpaction.test
org.jboss.soa.esb.samples.quickstart.helloworldsqlaction
org.jboss.soa.esb.samples.quickstart.helloworldtopicnotifier
org.jboss.soa.esb.samples.quickstart.helloworldtopicnotifier.test
org.jboss.soa.esb.samples.quickstart.helloworldtxsqlaction
org.jboss.soa.esb.samples.quickstart.hibernateaction
org.jboss.soa.esb.samples.quickstart.httpgateway
org.jboss.soa.esb.samples.quickstart.invm.test
org.jboss.soa.esb.samples.quickstart.jmsrouter.test
org.jboss.soa.esb.samples.quickstart.jmssecured.test
org.jboss.soa.esb.samples.quickstart.jmstopic
org.jboss.soa.esb.samples.quickstart.jmstransacted.test
org.jboss.soa.esb.samples.quickstart.jmx
org.jboss.soa.esb.samples.quickstart.load_generator
org.jboss.soa.esb.samples.quickstart.messagealerts
org.jboss.soa.esb.samples.quickstart.messagealerts.test
org.jboss.soa.esb.samples.quickstart.messagefilter
org.jboss.soa.esb.samples.quickstart.messagefilter.test
org.jboss.soa.esb.samples.quickstart.messagestore
org.jboss.soa.esb.samples.quickstart.messagestore.test
org.jboss.soa.esb.samples.quickstart.monitoringaction
org.jboss.soa.esb.samples.quickstart.monitoringaction.test
org.jboss.soa.esb.samples.quickstart.nativeclient
org.jboss.soa.esb.samples.quickstart.nativeclient.webservice
org.jboss.soa.esb.samples.quickstart.publishAsWebservice
org.jboss.soa.esb.samples.quickstart.publishAsWebservice.test
org.jboss.soa.esb.samples.quickstart.recipientList.test
org.jboss.soa.esb.samples.quickstart.ruleagent.businessrules
org.jboss.soa.esb.samples.quickstart.ruleagent.businessrules.test
org.jboss.soa.esb.samples.quickstart.scheduler
org.jboss.soa.esb.samples.quickstart.scheduler.test
org.jboss.soa.esb.samples.quickstart.scriptingchain.test
org.jboss.soa.esb.samples.quickstart.scriptinggroovy.test
org.jboss.soa.esb.samples.quickstart.securitybasic
org.jboss.soa.esb.samples.quickstart.securitybasic.test
org.jboss.soa.esb.samples.quickstart.securitycert
org.jboss.soa.esb.samples.quickstart.securitycert.test
org.jboss.soa.esb.samples.quickstart.securitycert.webservice
org.jboss.soa.esb.samples.quickstart.securityjbpm
org.jboss.soa.esb.samples.quickstart.securityjbpm.test
org.jboss.soa.esb.samples.quickstart.securitysaml
org.jboss.soa.esb.samples.quickstart.securitysaml.test
org.jboss.soa.esb.samples.quickstart.securitysaml.webservice
org.jboss.soa.esb.samples.quickstart.simplecbr
org.jboss.soa.esb.samples.quickstart.simplecbr.test
org.jboss.soa.esb.samples.quickstart.spring_aop
org.jboss.soa.esb.samples.quickstart.spring_aop.test
org.jboss.soa.esb.samples.quickstart.spring_helloworld
org.jboss.soa.esb.samples.quickstart.spring_helloworld.test
org.jboss.soa.esb.samples.quickstart.spring_jpetstore
org.jboss.soa.esb.samples.quickstart.spring_jpetstore.test
org.jboss.soa.esb.samples.quickstart.staticrouter
org.jboss.soa.esb.samples.quickstart.staticrouter.test
org.jboss.soa.esb.samples.quickstart.transformcsv2xml
org.jboss.soa.esb.samples.quickstart.transformedi2xmlgroovyxslt.test
org.jboss.soa.esb.samples.quickstart.transformxml2pojo
org.jboss.soa.esb.samples.quickstart.transformxml2pojo.test
org.jboss.soa.esb.samples.quickstart.transformxml2pojo2
org.jboss.soa.esb.samples.quickstart.transformxml2pojo2.test
org.jboss.soa.esb.samples.quickstart.transformxml2xmldatemanipulation.test
org.jboss.soa.esb.samples.quickstart.transformxml2xmlsimple.test
org.jboss.soa.esb.samples.quickstart.transformxml2xmlstream.test
org.jboss.soa.esb.samples.quickstart.twoservers
org.jboss.soa.esb.samples.quickstart.twoservers.test
org.jboss.soa.esb.samples.quickstart.udpgateway.test
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.client
org.jboss.soa.esb.samples.quickstart.webserviceproducer.test
org.jboss.soa.esb.samples.quickstart.webserviceproducer.webservice
org.jboss.soa.esb.samples.quickstart.webservicewsa
org.jboss.soa.esb.samples.quickstart.webservicewsa.client
org.jboss.soa.esb.samples.quickstart.webservice_consumer1
org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test
org.jboss.soa.esb.samples.quickstart.webservice_consumer2
org.jboss.soa.esb.samples.quickstart.webservice_consumer2.test
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.test
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise2.test
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise3
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise3.test
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise4
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise4.handler
org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise4.test
org.jboss.soa.esb.samples.quickstart.webservice_proxy_basic
org.jboss.soa.esb.samples.quickstart.webservice_proxy_basic.test
org.jboss.soa.esb.samples.quickstart.webservice_proxy_routed
org.jboss.soa.esb.samples.quickstart.webservice_proxy_routed.test
org.jboss.soa.esb.samples.quickstart.webservice_proxy_security
org.jboss.soa.esb.samples.quickstart.webservice_proxy_security.test
org.jboss.soa.esb.samples.quickstart.webservice_proxy_versioning
org.jboss.soa.esb.samples.quickstart.webservice_proxy_versioning.test
org.jboss.soa.esb.samples.quickstart.wiretap.test
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.esb_actions
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.process_actions
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.test
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.process_actions
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.test
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.esb_actions
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.test
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.esb_actions
org.jboss.soa.esb.samples.quickstarts.bpm_orchestration4.test
org.jboss.soa.esb.schedule
org.jboss.soa.esb.schedule.JBESB_2146
org.jboss.soa.esb.server
org.jboss.soa.esb.server.ebws
org.jboss.soa.esb.server.ftp
org.jboss.soa.esb.server.jbpmAsync
org.jboss.soa.esb.server.jbpmLocal
org.jboss.soa.esb.server.jbpmReply
org.jboss.soa.esb.server.jca
org.jboss.soa.esb.server.jcaTx
org.jboss.soa.esb.services
org.jboss.soa.esb.services.jbpm
org.jboss.soa.esb.services.jbpm.actionhandlers
org.jboss.soa.esb.services.jbpm.actions
org.jboss.soa.esb.services.jbpm.cmd
org.jboss.soa.esb.services.jbpm.configuration
org.jboss.soa.esb.services.jbpm.integration
org.jboss.soa.esb.services.jbpm.integration.command
org.jboss.soa.esb.services.jbpm.integration.job
org.jboss.soa.esb.services.jbpm.integration.msg
org.jboss.soa.esb.services.jbpm.integration.timer
org.jboss.soa.esb.services.persistence
org.jboss.soa.esb.services.registry
org.jboss.soa.esb.services.routing
org.jboss.soa.esb.services.routing.cbr
org.jboss.soa.esb.services.rules
org.jboss.soa.esb.services.security
org.jboss.soa.esb.services.security.auth
org.jboss.soa.esb.services.security.auth.http
org.jboss.soa.esb.services.security.auth.login
org.jboss.soa.esb.services.security.auth.ws
org.jboss.soa.esb.services.security.principals
org.jboss.soa.esb.services.security.util
org.jboss.soa.esb.services.soapui
org.jboss.soa.esb.services.soapui.orderprocessing
org.jboss.soa.esb.services.transform
org.jboss.soa.esb.services.xml
org.jboss.soa.esb.servlet
org.jboss.soa.esb.smooks
org.jboss.soa.esb.smooks.message
org.jboss.soa.esb.smooks.resource
org.jboss.soa.esb.smooks.splitting
org.jboss.soa.esb.store
org.jboss.soa.esb.tests.filter
org.jboss.soa.esb.testutils
org.jboss.soa.esb.testutils.jbr
org.jboss.soa.esb.testutils.test
org.jboss.soa.esb.util
org.jboss.soa.esb.util.ssl
org.jboss.soa.esb.visitors
org.jboss.test.ws.jaxws.samples.wssecurity
org.jboss.test.ws.jaxws.samples.wssecurity.client
org.jboss.tutorial.stateless.bean
org.jboss.tutorial.stateless.client
org.jbosson.plugins.jbossesb
org.jbpm.ant
org.mockito Mockito is a mock library for java - see Mockito class for for usage.
org.mockito.asm Provides a small and fast bytecode manipulation framework.

The ASM framework is organized around the {@link org.objectweb.asm.ClassVisitor ClassVisitor}, {@link org.objectweb.asm.FieldVisitor FieldVisitor} and {@link org.objectweb.asm.MethodVisitor MethodVisitor} interfaces, which allow one to visit the fields and methods of a class, including the bytecode instructions of each method.

In addition to these main interfaces, ASM provides a {@link org.objectweb.asm.ClassReader ClassReader} class, that can parse an existing class and make a given visitor visit it. ASM also provides a {@link org.objectweb.asm.ClassWriter ClassWriter} class, which is a visitor that generates Java class files.

In order to generate a class from scratch, only the {@link org.objectweb.asm.ClassWriter ClassWriter} class is necessary. Indeed, in order to generate a class, one must just call its visitXXX methods with the appropriate arguments to generate the desired fields and methods. See the "helloworld" example in the ASM distribution for more details about class generation.

In order to modify existing classes, one must use a {@link org.objectweb.asm.ClassReader ClassReader} class to analyze the original class, a class modifier, and a {@link org.objectweb.asm.ClassWriter ClassWriter} to construct the modified class. The class modifier is just a {@link org.objectweb.asm.ClassVisitor ClassVisitor} that delegates most of the work to another {@link org.objectweb.asm.ClassVisitor ClassVisitor}, but that sometimes changes some parameter values, or call additional methods, in order to implement the desired modification process. In order to make it easier to implement such class modifiers, ASM provides the {@link org.objectweb.asm.ClassAdapter ClassAdapter} and {@link org.objectweb.asm.MethodAdapter MethodAdapter} classes, which implement the {@link org.objectweb.asm.ClassVisitor ClassVisitor} and {@link org.objectweb.asm.MethodVisitor MethodVisitor} interfaces by delegating all work to other visitors. See the "adapt" example in the ASM distribution for more details about class modification.

The size of the core ASM library, asm.jar, is only 42KB, which is much smaller than the size of the BCEL library (504KB), and than the size of the SERP library (150KB). ASM is also much faster than these tools. Indeed the overhead of a load time class transformation process is of the order of 60% with ASM, 700% or more with BCEL, and 1100% or more with SERP (see the test/perf directory in the ASM distribution)! @since ASM 1.3

org.mockito.asm.signature Provides support for type signatures. @since ASM 2.0
org.mockito.asm.tree

Provides an ASM visitor that constructs a tree representation of the classes it visits. This class adapter can be useful to implement "complex" class manipulation operations, i.e., operations that would be very hard to implement without using a tree representation (such as optimizing the number of local variables used by a method).

However, this class adapter has a cost: it makes ASM bigger and slower. Indeed it requires more than twenty new classes, and multiplies the time needed to transform a class by almost two (it is almost two times faster to read, "modify" and write a class with a ClassAdapter than with a ClassNode). This is why this package is bundled in an optional asm-tree.jar library that is separated from (but requires) the asm.jar library, which contains the core ASM framework. This is also why it is recommended not to use this class adapter when it is possible.

The root class is the ClassNode, that can be created from existing bytecode. For example:

  ClassReader cr = new ClassReader(source);
  ClassNode cn = new ClassNode();
  cr.accept(cn, true);

Now content of ClassNode can be modified and then serialized back into bytecode:

  ClassWriter cw = new ClassWriter(true);
  cn.accept(cw);

Using simple ClassAdapter it is possible to create MethodNode instances per-method. In this example MethodNode is acting as a buffer that is flushed out at visitEnd() call:

  ClassReader cr = new ClassReader(source);
  ClassWriter cw = new ClassWriter();
  ClassAdapter ca = new ClassAdapter(cw) {
      public MethodVisitor visitMethod(int access, String name, 
          String desc, String signature, String[] exceptions) {
        final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
        MethodNode mn = new MethodNode(access, name, desc, signature, exceptions) {
            public void visitEnd() {
              // transform or analyze method code using tree API
              accept(mv);
            }
          };
      }
    };
  cr.accept(ca, true);

Several strategies can be used to construct method code from scratch. The first option is to create a MethodNode, and then create XXXInsnNode instances and add them to the instructions list:

MethodNode m = new MethodNode(...);
m.instructions.add(new VarInsnNode(ALOAD, 0));
...

Alternatively, you can use the fact that MethodNode is a MethodVisitor, and use that to create the XXXInsnNode and add them to the instructions list through the standard MethodVisitor interface:

MethodNode m = new MethodNode(...);
m.visitVarInsn(ALOAD, 0);
...

If you cannot generate all the instructions in sequential order, i.e. if you need to save some pointer in the instruction list and then insert instructions at that place after other instructions have been generated, you can use InsnList methods insert() and insertBefore() to insert instructions at saved pointer.

MethodNode m = new MethodNode(...);
m.visitVarInsn(ALOAD, 0);
AbstractInsnNode ptr = m.instructions.getLast();
m.visitVarInsn(ALOAD, 1);
// inserts an instruction between ALOAD 0 and ALOAD 1
m.instructions.insert(ptr, new VarInsnNode(ALOAD, 0));
...

If you need to insert instructions while iterating over an existing instruction list, you can also use several strategies. The first one is to use a ListIterator over the instruction list:

ListIterator it = m.instructions.iterator();
while (it.hasNext()) {
    AbstractInsnNode n = (AbstractInsnNode) it.next();
    if (...) {
        it.add(new VarInsnNode(ALOAD, 0));
    }
}

It is also possible to convert instruction list into the array and iterate trough array elements:

AbstractInsnNode[] insns = m.instructions.toArray();
for(int i = 0; i<insns.length; i++) {
    AbstractInsnNode n = insns[i];
    if (...) {
        m.instructions.insert(n, new VarInsnNode(ALOAD, 0));
    }
}

If you want to insert these instructions through the MethodVisitor interface, you can use another instance of MethodNode as a MethodVisitor and then insert instructions collected by that instance into the instruction list. For example:

AbstractInsnNode[] insns = m.instructions.toArray();
for(int i = 0; i<insns.length; i++) {
    AbstractInsnNode n = insns[i];
    if (...) {
        MethodNode mn = new MethodNode();
        mn.visitVarInsn(ALOAD, 0);
        mn.visitVarInsn(ALOAD, 1);
        m.instructions.insert(n, mn.instructions);
    }
}

@since ASM 1.3.3

org.mockito.asm.tree.analysis

Provides a framework for static code analysis based on the asm.tree package.

Basic usage:

ClassReader cr = new ClassReader(bytecode);
ClassNode cn = new ClassNode();
cr.accept(cn, ClassReader.SKIP_DEBUG);

List methods = cn.methods;
for (int i = 0; i < methods.size(); ++i) {
    MethodNode method = (MethodNode) methods.get(i);
    if (method.instructions.size() > 0) {
        Analyzer a = new Analyzer(new BasicInterpreter());
        a.analyze(cn.name, method);
        Frame[] frames = a.getFrames();
        // Elements of the frames arrray now contains info for each instruction 
        // from the analyzed method. BasicInterpreter creates BasicValue, that
        // is using simplified type system that distinguishes the UNINITIALZED, 
        // INT, FLOAT, LONG, DOUBLE, REFERENCE and RETURNADDRESS types.
        ...
    }
}   

@since ASM 1.4.3

org.mockito.asm.util Provides ASM visitors that can be useful for programming and debugging purposes. These class visitors are normally not used by applications at runtime. This is why they are bundled in an optional asm-util.jar library that is separated from (but requires) the asm.jar library, which contains the core ASM framework. @since ASM 1.3.2
org.mockito.cglib.beans
org.mockito.cglib.core
org.mockito.cglib.proxy
org.mockito.cglib.reflect
org.mockito.cglib.transform
org.mockito.cglib.transform.impl
org.mockito.cglib.util
org.mockito.configuration Mockito configuration utilities
org.mockito.exceptions Exception messages, exception hierarchies.
org.mockito.exceptions.base Base classes for exceptions and errors, stack trace filtering/removing logic.
org.mockito.exceptions.misusing Exceptions thrown when Mockito is misused.
org.mockito.exceptions.verification Verification errors.
org.mockito.exceptions.verification.junit JUnit integration to provide better support for junit runners in IDEs.
org.mockito.internal Internal classes, not to be used by clients.
org.mockito.internal.configuration Mockito configuration
org.mockito.internal.creation Mock object creation.
org.mockito.internal.creation.cglibCGLIB related stuff
org.mockito.internal.creation.jmockBorrowed from jmock codebase
org.mockito.internal.debugging Whatever helps in debugging failed tests
org.mockito.internal.exceptions.base internal implementations of exceptions stuff
org.mockito.internal.invocation Invocation and related classes.
org.mockito.internal.invocation.realmethod implementations of real method calls
org.mockito.internal.matchers Argument matchers for verification and stubbing.
org.mockito.internal.matchers.apachecommons Argument matchers that use Apache Commons Lang reflection-equality.
org.mockito.internal.progress Mocking progress stateful classes.
org.mockito.internal.reporting Deals with nicely printing verification errors
org.mockito.internal.runners Internal classes for runners implementations
org.mockito.internal.runners.util Internal utils for runner implementations
org.mockito.internal.stubbing Stubbing logic.
org.mockito.internal.stubbing.answers Answers for stubbed calls
org.mockito.internal.stubbing.defaultanswers Implementations of ReturnValues
org.mockito.internal.util Static utils
org.mockito.internal.util.reflection reflection utilities
org.mockito.internal.verification Verification logic.
org.mockito.internal.verification.api This package should be open to public once verification API is fully finished
org.mockito.internal.verification.argumentmatching Deals with matching arguments
org.mockito.internal.verification.checkers verification checkers
org.mockito.invocation Publicly visible classes related to invocation
org.mockito.runners JUnit runners.
org.mockito.stubbing External stubbing related classes
org.objenesis
org.objenesis.instantiator
org.objenesis.instantiator.basic
org.objenesis.instantiator.gcj
org.objenesis.instantiator.jrockit
org.objenesis.instantiator.sun
org.objenesis.strategy
w___w__w_.__ja__va___2__s__._c___o___m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.