public final class ReflectUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReflectUtil.ReflectionException |
Modifier and Type | Method and Description |
---|---|
static <T> Constructor<T> |
getConstructor(Class<T> c,
Class<?>... parameterTypes) |
static Field |
getField(Class<?> c,
String fieldName) |
static Method |
getMethod(Class<?> c,
String methodName,
Class<?>... parameterTypes) |
static Object |
getValue(Field field,
Object target) |
static Object |
getValue(String fieldName,
Object target) |
static Object |
invokeMethod(Method method,
Object target,
Object... arguments) |
static <T> T |
newInstance(Constructor<T> constructor,
Object... arguments) |
static void |
setValue(Field field,
Object target,
Object value) |
static void |
setValue(Field field,
Object target,
Object value,
boolean force) |
public static <T> Constructor<T> getConstructor(Class<T> c, Class<?>... parameterTypes)
public static <T> T newInstance(Constructor<T> constructor, Object... arguments)
Copyright (c) 2014 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v20.html