public class ReflectToJavassist extends Object
Constructor and Description |
---|
ReflectToJavassist() |
Modifier and Type | Method and Description |
---|---|
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) |
public static javassist.CtClass classToJavassist(Class<?> clazz) throws javassist.NotFoundException
javassist.NotFoundException
public static javassist.CtField fieldToJavassist(Field field) throws javassist.NotFoundException
javassist.NotFoundException
public static javassist.CtConstructor constructorToJavassist(Constructor<?> con) throws javassist.NotFoundException
javassist.NotFoundException
public static javassist.CtMethod methodToJavassist(Method method) throws javassist.NotFoundException
javassist.NotFoundException
public static String castInvocationValueToTypeString(Class<?> type, String valueName)
type
- type to use on castingvalueName
- name of the value as recognized on the generated code.
Compiler considers this expression as being of type
java.lang.Object
valueName
to type
(if type
is primitive, the value will
be unwrapped).Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.