org.iternine.jeppetto.enhance
Class TemplateHelper

java.lang.Object
  extended by org.iternine.jeppetto.enhance.TemplateHelper

public class TemplateHelper
extends Object


Nested Class Summary
 class TemplateHelper.Pair<E,F>
           
 
Constructor Summary
TemplateHelper(javassist.ClassPool pool)
           
 
Method Summary
 String asSetter(javassist.CtMethod getter)
           
 TemplateHelper cls(String name)
           
 String clsName()
           
 javassist.CtClass compile()
           
 String createConversionMethodBody(Class<?> returnType)
           
 String ctor(String code)
           
 TemplateHelper ext(javassist.CtClass superClass)
           
 String field(String code)
           
 TemplateHelper impl(String interfaceName)
           
 String keyFor(String getterName)
           
 String method(String code)
           
 Class<?> returnTypeOf(javassist.CtMethod method)
           
 Class<?>[] returnTypeParamsOf(javassist.CtMethod method)
           
 String toString()
           
 String wrapperNameFor(Class<?> cls)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateHelper

public TemplateHelper(javassist.ClassPool pool)
Method Detail

cls

public TemplateHelper cls(String name)

clsName

public String clsName()

ext

public TemplateHelper ext(javassist.CtClass superClass)
                   throws javassist.CannotCompileException
Throws:
javassist.CannotCompileException

impl

public TemplateHelper impl(String interfaceName)
                    throws javassist.NotFoundException
Throws:
javassist.NotFoundException

field

public String field(String code)
             throws javassist.CannotCompileException
Throws:
javassist.CannotCompileException

ctor

public String ctor(String code)
            throws javassist.CannotCompileException
Throws:
javassist.CannotCompileException

method

public String method(String code)
              throws javassist.CannotCompileException
Throws:
javassist.CannotCompileException

asSetter

public String asSetter(javassist.CtMethod getter)

keyFor

public String keyFor(String getterName)

returnTypeOf

public Class<?> returnTypeOf(javassist.CtMethod method)
                      throws ClassNotFoundException,
                             NoSuchMethodException
Throws:
ClassNotFoundException
NoSuchMethodException

returnTypeParamsOf

public Class<?>[] returnTypeParamsOf(javassist.CtMethod method)
                              throws ClassNotFoundException,
                                     NoSuchMethodException
Throws:
ClassNotFoundException
NoSuchMethodException

wrapperNameFor

public String wrapperNameFor(Class<?> cls)

compile

public javassist.CtClass compile()

createConversionMethodBody

public String createConversionMethodBody(Class<?> returnType)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.