org.jboss.aop.util
Class ReflectToJavassist

java.lang.Object
  extended by org.jboss.aop.util.ReflectToJavassist

public class ReflectToJavassist
extends Object

Comment

Version:
$Revision: 71276 $
Author:
Bill Burke

Constructor Summary
ReflectToJavassist()
           
 
Method Summary
static String castInvocationValueToTypeString(Class<?> type, String valueName)
          Casts a value to the type required.
static javassist.CtClass classToJavassist(Class<?> clazz)
           
static javassist.CtConstructor constructorToJavassist(Constructor<?> con)
           
static javassist.CtField fieldToJavassist(Field field)
           
static javassist.CtMethod methodToJavassist(Method method)
           
protected static String simpleType(Class<?> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectToJavassist

public ReflectToJavassist()
Method Detail

classToJavassist

public static javassist.CtClass classToJavassist(Class<?> clazz)
                                          throws javassist.NotFoundException
Throws:
javassist.NotFoundException

fieldToJavassist

public static javassist.CtField fieldToJavassist(Field field)
                                          throws javassist.NotFoundException
Throws:
javassist.NotFoundException

constructorToJavassist

public static javassist.CtConstructor constructorToJavassist(Constructor<?> con)
                                                      throws javassist.NotFoundException
Throws:
javassist.NotFoundException

simpleType

protected static String simpleType(Class<?> type)

methodToJavassist

public static javassist.CtMethod methodToJavassist(Method method)
                                            throws javassist.NotFoundException
Throws:
javassist.NotFoundException

castInvocationValueToTypeString

public static String castInvocationValueToTypeString(Class<?> type,
                                                     String valueName)
Casts a value to the type required.

Parameters:
type - type to use on casting
valueName - name of the value as recognized on the generated code. Compiler considers this expression as being of type java.lang.Object
Returns:
a string that casts valueName to type (if type is primitive, the value will be unwrapped).


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.