Contains class-specific information used when transforming a raw component class into an executable component class. An executable class is one that has been transformed to work within Tapestry. This includes adding interfaces ( {@link org.apache.tapestry5.runtime.Component}) but also transforming access to fields, based on annotations and naming conventions. Most of the changes are provided by different implementations of {@link ComponentClassTransformWorker}.
Much of this information is somewhat like ordinary reflection, but applies to a class that has not yet been loaded. Field types, return types, parameter types and exception types are represented as string names, since any of them may be a class that has not yet been loaded and transformed as well.
Transformation is primarily about identifying annotations on fields and on methods and changing the class, adding new interfaces, fields and methods, and deleting some existing fields.
A ClassTransformation contains all the state data specific to a particular class being transformed. A number of
workers will operate upon the ClassTransformation to effect the desired changes before the true class is loaded into memory.
Instances of this class are not designed to be thread safe, access to an instance should be restricted to a single thread. In fact, the design of this type is to allow stateless singletons in multiple threads to work on thread-specific data (within the ClassTransformation).
The majority of methods concern the
declared members (field and methods) of a specific class, rather than any fields or methods inherited from a base class.
@see org.apache.tapestry5.services.TapestryModule#contributeComponentClassTransformWorker(org.apache.tapestry5.ioc.OrderedConfiguration,org.apache.tapestry5.ioc.ObjectLocator,InjectionProvider,ComponentClassResolver)