public class RuntimeAnnotatedMembers extends Object
AnnotatedMembers at runtime.| Constructor and Description |
|---|
RuntimeAnnotatedMembers() |
| Modifier and Type | Method and Description |
|---|---|
static <T,X> T |
getFieldValue(AnnotatedField<X> field,
Object instance) |
static <T,X> T |
invokeMethod(AnnotatedMethod<X> method,
Object instance,
Object... parameters) |
static <T> T |
newInstance(AnnotatedConstructor<T> constructor,
Object... parameters)
Creates a new instance
|
static void |
setFieldValue(AnnotatedField<?> field,
Object instance,
Object value)
Injects an instance
|
static void |
setFieldValueOnInstance(AnnotatedField<?> field,
Object instance,
Object value) |
public static <T> T newInstance(AnnotatedConstructor<T> constructor, Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
parameters - the parametersInvocationTargetExceptionIllegalAccessExceptionInstantiationExceptionIllegalArgumentExceptionorg.jboss.weld.annotated.enhanced.EnhancedAnnotatedConstructor#newInstance(Object... params)public static void setFieldValue(AnnotatedField<?> field, Object instance, Object value) throws IllegalArgumentException, IllegalAccessException
declaringInstance - The instance to inject intovalue - The value to injectIllegalArgumentExceptionIllegalAccessExceptionpublic static void setFieldValueOnInstance(AnnotatedField<?> field, Object instance, Object value) throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException
public static <T,X> T getFieldValue(AnnotatedField<X> field, Object instance)
public static <T,X> T invokeMethod(AnnotatedMethod<X> method, Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
Copyright © 2012 Seam Framework. All Rights Reserved.