org.modeldriven.fuml.common.reflect
Class ReflectionUtils
java.lang.Object
org.modeldriven.fuml.common.reflect.ReflectionUtils
public class ReflectionUtils
- extends java.lang.Object
|
Method Summary |
static java.lang.reflect.Method |
findMethod(java.lang.Class<?> target,
java.lang.String name,
java.lang.Class<?> arg)
|
static java.lang.reflect.Method |
findMethod(java.lang.reflect.Method[] methods,
java.lang.String name,
java.lang.Class<?> arg)
|
static java.lang.reflect.Method |
getMethod(java.lang.Class<?> target,
java.lang.String name,
java.lang.Class<?> arg)
|
static java.lang.Object |
instanceForName(java.lang.String qualifiedName)
|
static java.lang.Object |
instanceForName(java.lang.String qualifiedName,
java.lang.Object[] args,
java.lang.Class<?>[] types)
|
static java.lang.Object |
invokePublicGetterOrField(java.lang.Object target,
java.lang.String propertyName)
|
static void |
invokePublicSetterOrField(java.lang.Object target,
java.lang.String propertyName,
java.lang.Class<?> javaType,
java.lang.Object value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectionUtils
public ReflectionUtils()
findMethod
public static java.lang.reflect.Method findMethod(java.lang.Class<?> target,
java.lang.String name,
java.lang.Class<?> arg)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
getMethod
public static java.lang.reflect.Method getMethod(java.lang.Class<?> target,
java.lang.String name,
java.lang.Class<?> arg)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
findMethod
public static java.lang.reflect.Method findMethod(java.lang.reflect.Method[] methods,
java.lang.String name,
java.lang.Class<?> arg)
instanceForName
public static java.lang.Object instanceForName(java.lang.String qualifiedName)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
- Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.InstantiationException
instanceForName
public static java.lang.Object instanceForName(java.lang.String qualifiedName,
java.lang.Object[] args,
java.lang.Class<?>[] types)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
- Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.InstantiationException
invokePublicGetterOrField
public static java.lang.Object invokePublicGetterOrField(java.lang.Object target,
java.lang.String propertyName)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
invokePublicSetterOrField
public static void invokePublicSetterOrField(java.lang.Object target,
java.lang.String propertyName,
java.lang.Class<?> javaType,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
Copyright © 2015. All Rights Reserved.