org.seasar.aptina.beans.internal
クラス BeanInfoFactory

java.lang.Object
  上位を拡張 org.seasar.aptina.beans.internal.BeanInfoFactory

public class BeanInfoFactory
extends Object

状態クラスから生成される Bean クラスの情報を作成するクラスです.

作成者:
koichik

フィールドの概要
protected  AnnotationMirror beanStateAnnotation
          処理対象のクラスに付けられた BeanState アノテーションを表現する AnnotationMirror
protected  ProcessingEnvironment env
          ProcessingEnvironment
protected  boolean hasError
          状態クラスにエラーがある場合は true
protected static Set<Modifier> IGNORE_FIELD_MODIFIERS
          プロパティの対象とならないフィールドが持つ修飾子の Set です.
protected  EnumMessageTextFormatter<DiagnosticMessageCode> messageFormatter
          メッセージフォーマッタ
 
コンストラクタの概要
BeanInfoFactory(ProcessingEnvironment env)
          インスタンスを構築します.
 
メソッドの概要
 BeanInfo createBeanInfo(TypeElement typeElement)
          状態クラスの TypeElement を処理して Bean クラスの情報を持つ BeanInfo を生成します.
protected  void printMessage(Element element, AnnotationMirror annotation, DiagnosticMessageCode messageCode, Object... args)
          メッセージを出力します.
protected  void printMessage(Element element, DiagnosticMessageCode messageCode, Object... args)
          メッセージを出力します.
protected  ConstructorInfo processConstructor(ExecutableElement executableElement)
          状態クラスのコンストラクタに対応する ExecutableElement を処理して Bean クラスのコンストラクタ情報を集めます.
protected  PropertyInfo processField(VariableElement variableElement)
          状態クラスのフィールドに対応する VariableElement を処理して Bean クラスのプロパティ情報を集めます.
protected  void processMethod(ExecutableElement executableElement, BeanInfo beanInfo)
          状態クラスのメソッドに対応する ExecutableElement を処理して Bean クラスのプロパティ情報を修正します.
protected  BeanInfo processType(TypeElement typeElement)
          状態クラスの TypeElement を処理して Bean クラスの情報を集めます.
protected static String toBeanClassName(String stateClassName)
          状態クラスの名前から対応する Bean クラスの名前を返します.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

IGNORE_FIELD_MODIFIERS

protected static final Set<Modifier> IGNORE_FIELD_MODIFIERS
プロパティの対象とならないフィールドが持つ修飾子の Set です.


env

protected ProcessingEnvironment env
ProcessingEnvironment


messageFormatter

protected EnumMessageTextFormatter<DiagnosticMessageCode> messageFormatter
メッセージフォーマッタ


beanStateAnnotation

protected AnnotationMirror beanStateAnnotation
処理対象のクラスに付けられた BeanState アノテーションを表現する AnnotationMirror


hasError

protected boolean hasError
状態クラスにエラーがある場合は true

コンストラクタの詳細

BeanInfoFactory

public BeanInfoFactory(ProcessingEnvironment env)
インスタンスを構築します.

パラメータ:
env - ProcessingEnvironment
メソッドの詳細

createBeanInfo

public BeanInfo createBeanInfo(TypeElement typeElement)
状態クラスの TypeElement を処理して Bean クラスの情報を持つ BeanInfo を生成します.

パラメータ:
typeElement - 状態クラスの TypeElement
戻り値:
Bean クラスの情報を持つ BeanInfo

processType

protected BeanInfo processType(TypeElement typeElement)
状態クラスの TypeElement を処理して Bean クラスの情報を集めます.

パラメータ:
typeElement - 状態クラスの TypeElement
戻り値:
Bean クラスの情報

processField

protected PropertyInfo processField(VariableElement variableElement)
状態クラスのフィールドに対応する VariableElement を処理して Bean クラスのプロパティ情報を集めます.

パラメータ:
variableElement - 状態クラスのフィールドに対応する VariableElement
戻り値:
Bean クラスのプロパティ情報

processConstructor

protected ConstructorInfo processConstructor(ExecutableElement executableElement)
状態クラスのコンストラクタに対応する ExecutableElement を処理して Bean クラスのコンストラクタ情報を集めます.

パラメータ:
executableElement - 状態クラスのコンストラクタに対応する ExecutableElement
戻り値:
Bean クラスのコンストラクタ情報

processMethod

protected void processMethod(ExecutableElement executableElement,
                             BeanInfo beanInfo)
状態クラスのメソッドに対応する ExecutableElement を処理して Bean クラスのプロパティ情報を修正します.

パラメータ:
executableElement - 状態クラスのメソッドに対応する ExecutableElement
beanInfo - Bean クラスの情報

toBeanClassName

protected static String toBeanClassName(String stateClassName)
状態クラスの名前から対応する Bean クラスの名前を返します.

パラメータ:
stateClassName - 状態クラスの単純名
戻り値:
Bean クラスの単純名

printMessage

protected void printMessage(Element element,
                            DiagnosticMessageCode messageCode,
                            Object... args)
メッセージを出力します.

パラメータ:
element - メッセージの対象となる要素
messageCode - メッセージコード
args - メッセージに埋め込む引数

printMessage

protected void printMessage(Element element,
                            AnnotationMirror annotation,
                            DiagnosticMessageCode messageCode,
                            Object... args)
メッセージを出力します.

パラメータ:
element - メッセージの対象となる要素
annotation - メッセージの対象となるアノテーション
messageCode - メッセージコード
args - メッセージに埋め込む引数


Copyright © 2009-2010 The Seasar Foundation. All Rights Reserved.