[seasar-javadoc:794] Re: AbstractAnnotationHandler

Makoto Yonezawa stratosphire @ gmail.com
2007年 2月 4日 (日) 16:42:54 JST


米澤です。

ずいぶん、あけてしまって、本当にもうしわけなく...
新しく参加された方もよろしくお願いします。

ということで、まずは、AnnotationHandler.javaからお願いします。
で、以下の二つをどういう風に書いていいかわからないので、
すいませんが、ご教授お願いしますm__m
externalBinding
createPropertyDef


06/12/14 に Koichi Kobayashi<koichik @ improvement.jp> さんは書きました:
> 小林 (koichik) です.
>
> Date:    Wed, 13 Dec 2006 06:05:19 +0900
> From:    "Makoto Yonezawa" <stratosphire @ gmail.com>
> To:      seasar-javadoc @ ml.seasar.org
> Subject: [seasar-javadoc:742]  AbstractAnnotationHandler
>
> > おひさしぶりです。
> > 米澤です。
> > どうも、ご心配をかけてすいませんm__m
>
> いえいえ,米澤さんは一年中風邪がデフォルトだから
> 心配しても無駄だと忘年会で伝えておきました.(^^;
>
> > なんとか、体もマシンも無事になってきたようです(w
>
> マシンはともかく体の方は気のせいですよ,きっと.
>
> > で、早速作業再開しようと思うのですが、
> > AbstractAnnotationHandlerは、
> > AnnotationHandlerこっちから書いた方がいいですか?
>
> クラスコメントはともかく,メソッドのコメントは
> AnnotationHandler に書いて AbstractAnnotationHandler には
> 書かないってのがたくさんありそうなので,書くのは
> インタフェースからが無難な気はします.
>
> でもまぁ,ConstantAnnotationHandler も含めて好きなように
> やっていただいて構わないかと.(^^;
>
> > というか、早速、createComponentDef()で挫折中です--;
>
> 文字通り,コンポーネント定義を作成して返します.
> その際,ConstantAnnotationHandler は定数アノテーションを,
> S2-Tiger にある TigerAnnotationHandler は Java5 の
> アノテーションを参照して,指定されたとおりの
> コンポーネント定義を作成します.
>
> 例えば
>
> public static final String COMPONENT="name=hoge, instance=prototype";
>
> なんて定数アノテーションがあるクラスだと,あたかも dicon に
>
> <component name="hoge" instance="prototype" class="...">
>
> と書かれたかのようにコンポーネント定義を作成します.
> AutoRegister や SMART deploy では個々のコンポーネントを
> dicon に定義しないので,アノテーションで細かな設定を
> するわけです.
> AnnotationHandler はそれを読み取って指定されたとおりの
> コンポーネント定義を作成することが責務となります.
>
> 頑張ってねぇ〜.
>
>
> --
> <component name="koichik">
>     <property name="fullName">"Koichi Kobayashi"</property>
>     <property name="email">"koichik @ improvement.jp"</property>
>     <property name="blog">"http://d.hatena.ne.jp/koichik"</property>
> </component>
>
> _______________________________________________
> seasar-javadoc mailing list
> seasar-javadoc @ ml.seasar.org
> https://ml.seasar.org/mailman/listinfo/seasar-javadoc
>


-- 
-----------------------------
http://d.hatena.ne.jp/vestige/
http://www001.upp.so-net.ne.jp/vestige/
-------------- next part --------------
/*
 * Copyright 2004-2006 the Seasar Foundation and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.seasar.framework.container.factory;

import java.lang.reflect.Field;

import org.seasar.framework.beans.BeanDesc;
import org.seasar.framework.beans.PropertyDesc;
import org.seasar.framework.container.AutoBindingDef;
import org.seasar.framework.container.ComponentDef;
import org.seasar.framework.container.InstanceDef;
import org.seasar.framework.container.PropertyDef;

/**
 * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
 * @author vestige
 */
public interface AnnotationHandler {

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param className 〓〓〓〓〓〓〓〓〓〓〓〓
     * @param instanceDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    ComponentDef createComponentDef(String className, InstanceDef instanceDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param className 〓〓〓〓〓〓〓〓〓〓〓〓
     * @param instanceDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param autoBindingDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    ComponentDef createComponentDef(String className, InstanceDef instanceDef,
            AutoBindingDef autoBindingDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param className 〓〓〓〓〓〓〓〓〓〓〓〓
     * @param instanceDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param autoBindingDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param externalBinding ???
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    ComponentDef createComponentDef(String className, InstanceDef instanceDef,
            AutoBindingDef autoBindingDef, boolean externalBinding);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentClass 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param instanceDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    ComponentDef createComponentDef(Class componentClass,
            InstanceDef instanceDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentClass 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param instanceDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param autoBindingDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    ComponentDef createComponentDef(Class componentClass,
            InstanceDef instanceDef, AutoBindingDef autoBindingDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓???〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentClass 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param instanceDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param autoBindingDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param externalBinding ???
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    ComponentDef createComponentDef(Class componentClass,
            InstanceDef instanceDef, AutoBindingDef autoBindingDef,
            boolean externalBinding);

    /**
     * DI〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    void appendDI(ComponentDef componentDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    void appendAspect(ComponentDef componentDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    void appendInterType(ComponentDef componentDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    void appendInitMethod(ComponentDef componentDef);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param cd 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param methodName 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓<code>true</true>〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓<code>false</code>〓〓〓〓〓〓〓〓〓〓〓〓
     */
    boolean isInitMethodRegisterable(ComponentDef cd, String methodName);

    /**
     * destroyMethod〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param componentDef 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    void appendDestroyMethod(ComponentDef componentDef);

    /**
     * destroyMethod〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param cd 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @param methodName 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return destroyMethod〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓<code>true</true>〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓<code>false</code>〓〓〓〓〓〓〓〓〓〓〓〓
     */
    boolean isDestroyMethodRegisterable(ComponentDef cd, String methodName);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param beanDesc 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓Bean〓〓〓〓〓〓
     * @param propertyDesc 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    PropertyDef createPropertyDef(BeanDesc beanDesc, PropertyDesc propertyDesc);

    /**
     * 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * 
     * @param beanDesc 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓Bean〓〓〓〓〓〓
     * @param field 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     * @return 〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
     */
    PropertyDef createPropertyDef(BeanDesc beanDesc, Field field);

}


seasar-javadoc メーリングリストの案内