org.jboss.msc.value
Class LookupDeclaredFieldValue
java.lang.Object
org.jboss.msc.value.LookupDeclaredFieldValue
- All Implemented Interfaces:
- Value<Field>
public final class LookupDeclaredFieldValue
- extends Object
- implements Value<Field>
A value which looks up a possibly non-public field by name from a class. This may be considerably slower than
LookupFieldValue so that class should be used whenever possible.
- Author:
- David M. Lloyd
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LookupDeclaredFieldValue
public LookupDeclaredFieldValue(Value<Class<?>> target,
String fieldName,
AccessControlContext context,
boolean makeAccessible)
- Construct a new instance.
- Parameters:
target - the class in which to look for the fieldfieldName - the name of the field to look upcontext - the access control context to usemakeAccessible - true to make the field accessible under the provided access control context
getValue
public Field getValue()
throws IllegalStateException
- Get the actual value.
- Specified by:
getValue in interface Value<Field>
- Returns:
- the actual value
- Throws:
IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.
Copyright © 2010 JBoss, a division of Red Hat, Inc.