org.seasar.framework.aop.javassist
クラス MethodInvocationClassGenerator

java.lang.Object
  拡張org.seasar.framework.aop.javassist.AbstractGenerator
      拡張org.seasar.framework.aop.javassist.MethodInvocationClassGenerator

public class MethodInvocationClassGenerator
extends AbstractGenerator

MethodInvocationをエンハンスするクラスです。

作成者:
koichik

入れ子クラスの概要
static class MethodInvocationClassGenerator.MethodInvocationTemplate
          MethodInvocationのテンプレートです。
 
フィールドの概要
protected  String enhancedClassName
           
protected  CtClass methodInvocationClass
           
 
クラス org.seasar.framework.aop.javassist.AbstractGenerator から継承したフィールド
classPool, DEFINE_CLASS_METHOD_NAME, defineClassMethod, protectionDomain
 
コンストラクタの概要
MethodInvocationClassGenerator(ClassPool classPool, String invocationClassName, String targetClassName)
          MethodInvocationClassGeneratorを作成します。
 
メソッドの概要
static String createArgumentString(Class[] argTypes)
          引数用のソースを作成します。
static String createArgumentTypeString(Class[] argTypes)
          引数の型用のソースを作成します。
 void createProceedMethod(Method targetMethod, String invokeSuperMethodName)
          proceedメソッドを作成します。
static String createProceedMethodSource(Method targetMethod, String enhancedClassName, String invokeSuperMethodName)
          proceedメソッドのソースを作成します。
static String createReturnStatement(Method targetMethod, String enhancedClassName, String invokeSuperMethodName)
          return文用のソースを作成します。
static String createThrowStatement(Method targetMethod, String enhancedClassName)
          throws句用のソースを作成します。
 Class toClass(ClassLoader classLoader)
          CtClassClassに変換します。
 
クラス org.seasar.framework.aop.javassist.AbstractGenerator から継承したメソッド
createConstructor, createConstructor, createCtClass, createCtClass, createCtClass, createDefaultConstructor, createDefaultConstructor, createMethod, createMethod, createMethod, fromObject, getAndRenameCtClass, getAndRenameCtClass, getDeclaredMethod, setInterface, setInterfaces, setMethodBody, toClass, toCtClass, toCtClass, toCtClassArray, toCtClassArray, toObject
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

enhancedClassName

protected final String enhancedClassName

methodInvocationClass

protected CtClass methodInvocationClass
コンストラクタの詳細

MethodInvocationClassGenerator

public MethodInvocationClassGenerator(ClassPool classPool,
                                      String invocationClassName,
                                      String targetClassName)
MethodInvocationClassGeneratorを作成します。

パラメータ:
classPool -
invocationClassName -
targetClassName -
メソッドの詳細

createProceedMethod

public void createProceedMethod(Method targetMethod,
                                String invokeSuperMethodName)
proceedメソッドを作成します。

パラメータ:
targetMethod -
invokeSuperMethodName -

toClass

public Class toClass(ClassLoader classLoader)
CtClassClassに変換します。

パラメータ:
classLoader -
戻り値:

createProceedMethodSource

public static String createProceedMethodSource(Method targetMethod,
                                               String enhancedClassName,
                                               String invokeSuperMethodName)
proceedメソッドのソースを作成します。

パラメータ:
targetMethod -
enhancedClassName -
invokeSuperMethodName -
戻り値:
proceedメソッドのソース

createReturnStatement

public static String createReturnStatement(Method targetMethod,
                                           String enhancedClassName,
                                           String invokeSuperMethodName)
return文用のソースを作成します。

パラメータ:
targetMethod -
enhancedClassName -
invokeSuperMethodName -
戻り値:
return文用のソース

createThrowStatement

public static String createThrowStatement(Method targetMethod,
                                          String enhancedClassName)
throws句用のソースを作成します。

パラメータ:
targetMethod -
enhancedClassName -
戻り値:
throws句用のソース

createArgumentString

public static String createArgumentString(Class[] argTypes)
引数用のソースを作成します。

パラメータ:
argTypes -
戻り値:
引数用のソース

createArgumentTypeString

public static String createArgumentTypeString(Class[] argTypes)
引数の型用のソースを作成します。

パラメータ:
argTypes -
戻り値:
引数の型用のソース


Copyright © 2004-2007 The Seasar Foundation. All Rights Reserved.