Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
ComponentConstructorFactory |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation |
|
2 | // |
|
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 | // you may not use this file except in compliance with the License. |
|
5 | // You may obtain a copy of the License at |
|
6 | // |
|
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
|
8 | // |
|
9 | // 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.services; |
|
16 | ||
17 | import org.apache.tapestry.spec.IComponentSpecification; |
|
18 | ||
19 | /** |
|
20 | * <code>tapestry.enhance.ComponentConstructorFactory</code> service that acts as a wrapper around |
|
21 | * {@link org.apache.tapestry.enhance.EnhancementOperation}, used to take a base component class |
|
22 | * and provide an enhanced subclass of it. |
|
23 | * |
|
24 | * @author Howard M. Lewis Ship |
|
25 | * @since 4.0 |
|
26 | */ |
|
27 | public interface ComponentConstructorFactory |
|
28 | { |
|
29 | /** |
|
30 | * Passed a component specification and the base component class name, provides back an object |
|
31 | * used to instantiate instances of the component. {@link ComponentConstructor}s are internally |
|
32 | * cached, repeated calls with the same specification object will yield the same result. |
|
33 | * |
|
34 | * @param specification |
|
35 | * the page or component specification which directs the enhancement operation |
|
36 | * @param className |
|
37 | * the name of the base component class (in some cases, |
|
38 | * {@link IComponentSpecification#getComponentClassName()} is null andother code |
|
39 | * provides the default) |
|
40 | * @returns a constructor used to create instances of the enhanced component class |
|
41 | */ |
|
42 | ||
43 | ComponentConstructor getComponentConstructor(IComponentSpecification specification, |
|
44 | String className); |
|
45 | } |