public class EnhancedClassGenerator extends AbstractGenerator
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected javassist.CtClass |
enhancedClass
エンハンスされるクラス
|
protected String |
enhancedClassName
エンハンスされるクラス名
|
protected Class |
targetClass
ターゲットクラス
|
classPool, DEFINE_CLASS_METHOD_NAME, defineClassMethod, protectionDomain| コンストラクタと説明 |
|---|
EnhancedClassGenerator(javassist.ClassPool classPool,
Class targetClass,
String enhancedClassName)
EnhancedClassGeneratorを作成します。 |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
applyInterType(InterType interType)
InterTypeを適用します。 |
static String |
aroundTryCatchBlock(Class[] exceptionTypes,
String code)
元のソースコードをtry, cacheで囲んだソースコードを返します。
|
void |
createInvokeSuperMethod(Method method,
String invokeSuperMethodName)
superクラスのメソッドを呼び出すためのメソッドを作成します。
|
static String |
createInvokeSuperMethodSource(Method method)
superクラスのメソッドを呼び出すためのソースコードを作成します。
|
void |
createTargetMethod(Method method,
String methodInvocationClassName)
ターゲットのメソッドを作成します。
|
static String |
createTargetMethodSource(Method method,
String methodInvocationClassName)
ターゲットメソッド用のソースコードを作成します。
|
static Class[] |
normalizeExceptionTypes(Class[] exceptionTypes)
例外の型を正規化します。
|
void |
setupClass()
CtClassをセットアップします。
|
void |
setupConstructor()
Constructorのセットアップを行ないます。 |
void |
setupInterface()
インターフェース用のセットアップを行ないます。
|
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 Class targetClass
protected final String enhancedClassName
protected javassist.CtClass enhancedClass
public EnhancedClassGenerator(javassist.ClassPool classPool,
Class targetClass,
String enhancedClassName)
EnhancedClassGeneratorを作成します。classPool - targetClass - enhancedClassName - public void createTargetMethod(Method method, String methodInvocationClassName)
method - methodInvocationClassName - public void createInvokeSuperMethod(Method method, String invokeSuperMethodName)
method - invokeSuperMethodName - public Class toClass(ClassLoader classLoader)
classLoader - public void setupClass()
public void setupInterface()
public void setupConstructor()
Constructorのセットアップを行ないます。public static String createTargetMethodSource(Method method, String methodInvocationClassName)
method - methodInvocationClassName - public static String createInvokeSuperMethodSource(Method method)
method - public static Class[] normalizeExceptionTypes(Class[] exceptionTypes)
exceptionTypes - Copyright © 2015 The DBFlute Project. All rights reserved.