1 /*
2 * Copyright 2004-2008 the Seasar Foundation and the Others.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 * either express or implied. See the License for the specific language
14 * governing permissions and limitations under the License.
15 */
16 package org.seasar.uruma.container.creator;
17
18 import org.seasar.framework.container.ComponentCreator;
19 import org.seasar.framework.container.ComponentCustomizer;
20 import org.seasar.framework.container.assembler.AutoBindingDefFactory;
21 import org.seasar.framework.container.creator.ComponentCreatorImpl;
22 import org.seasar.framework.container.deployer.InstanceDefFactory;
23 import org.seasar.framework.convention.NamingConvention;
24
25 /**
26 * Sorterクラス用の {@link ComponentCreator}です。
27 * <p>
28 * 決められた命名規約に従って、クラスからProviderクラスのコンポーネント定義を作成します。 作成されるコンポーネント定義の各種属性は以下になります。
29 *
30 * <table>
31 * <tr>
32 * <th>サフィックス</th>
33 * <td>Sorter</td>
34 * </tr>
35 * <tr>
36 * <th>インスタンス定義</th>
37 * <td>SINGLETON</td>
38 * </tr>
39 * <tr>
40 * <th>自動バインディング</th>
41 * <td>無効</td>
42 * </tr>
43 * <tr>
44 * <th>外部バインディング</th>
45 * <td>無効</td>
46 * </tr>
47 * <tr>
48 * <th>インターフェース</th>
49 * <td>対象外</td>
50 * </tr>
51 * <tr>
52 * <th>抽象クラス</th>
53 * <td>対象外</td>
54 * </tr>
55 * </table>
56 * </p>
57 *
58 * @author y-komori
59 *
60 */
61 public class UrumaSorterCreator extends ComponentCreatorImpl {
62
63 /**
64 * 指定された{@link NamingConvention 命名規約}に従った{@link UrumaSorterCreator}を作成します。
65 *
66 * @param namingConvention
67 * 命名規約
68 */
69 public UrumaSorterCreator(final NamingConvention namingConvention) {
70 super(namingConvention);
71 setNameSuffix("Sorter");
72 setInstanceDef(InstanceDefFactory.SINGLETON);
73 setAutoBindingDef(AutoBindingDefFactory.NONE);
74 }
75
76 /**
77 * {@link ComponentCustomizer}を返します。
78 *
79 * @return コンポーネントカスタマイザ
80 */
81 public ComponentCustomizer getProviderCustomizer() {
82 return getCustomizer();
83 }
84
85 /**
86 * {@link ComponentCustomizer}を設定します。
87 *
88 * @param customizer
89 * コンポーネントカスタマイザ
90 */
91 public void setProviderCustomizer(final ComponentCustomizer customizer) {
92 setCustomizer(customizer);
93 }
94 }