public class MethodInvocationClassGenerator extends AbstractGenerator
MethodInvocationをエンハンスするクラスです。| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
MethodInvocationClassGenerator.MethodInvocationTemplate
MethodInvocationのテンプレートです。 |
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected String |
enhancedClassName
エンハンスされるクラス名
|
protected javassist.CtClass |
methodInvocationClass
メソッド呼び出しクラス
|
classPool, DEFINE_CLASS_METHOD_NAME, defineClassMethod, protectionDomain| コンストラクタと説明 |
|---|
MethodInvocationClassGenerator(javassist.ClassPool classPool,
String invocationClassName,
String targetClassName)
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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)
CtClassをClassに変換します。 |
createConstructor, createConstructor, createCtClass, createCtClass, createCtClass, createDefaultConstructor, createDefaultConstructor, createMethod, createMethod, createMethod, fromObject, getAndRenameCtClass, getAndRenameCtClass, getDeclaredMethod, setInterface, setInterfaces, setMethodBody, toClass, toCtClass, toCtClass, toCtClassArray, toCtClassArray, toObjectprotected final String enhancedClassName
protected javassist.CtClass methodInvocationClass
public void createProceedMethod(Method targetMethod, String invokeSuperMethodName)
targetMethod - invokeSuperMethodName - public Class toClass(ClassLoader classLoader)
CtClassをClassに変換します。classLoader - public static String createProceedMethodSource(Method targetMethod, String enhancedClassName, String invokeSuperMethodName)
proceedメソッドのソースを作成します。targetMethod - enhancedClassName - invokeSuperMethodName - proceedメソッドのソースpublic static String createReturnStatement(Method targetMethod, String enhancedClassName, String invokeSuperMethodName)
return文用のソースを作成します。targetMethod - enhancedClassName - invokeSuperMethodName - return文用のソースpublic static String createThrowStatement(Method targetMethod, String enhancedClassName)
throws句用のソースを作成します。targetMethod - enhancedClassName - throws句用のソースpublic static String createArgumentString(Class[] argTypes)
argTypes - Copyright © 2015 The DBFlute Project. All rights reserved.