01: // Copyright 2006 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry.internal.services;
16:
17: import javassist.CtClass;
18:
19: /**
20: * Encapsulates all the work performed by the
21: * {@link org.apache.tapestry.internal.services.ComponentInstantiatorSource} when it loads and
22: * transforms a class.
23: */
24: public interface ComponentClassTransformer {
25: /**
26: * Performs a transformation on the class, accessing the class from the class pool.
27: *
28: * @param ctClass
29: * compile time class to be transformed
30: * @param classLoader
31: * class loader used to resolve references to other classes (both transformed and
32: * not)
33: */
34: void transformComponentClass(CtClass ctClass,
35: ClassLoader classLoader);
36:
37: /** Creates a new instantiator instance. */
38: Instantiator createInstantiator(Class componentClass);
39: }
|