Class Overview
Common utility routines used by both java.lang and
java.lang.reflect
Summary
Public Methods |
static
void
|
ensureMemberAccess(Class currentClass, Class memberClass, Object target, int modifiers)
|
static
Field[]
|
filterFields(Class containingClass, Field[] fields)
|
static
Method[]
|
filterMethods(Class containingClass, Method[] methods)
|
static
Class
|
getCallerClass(int realFramesToSkip)
Returns the class of the method realFramesToSkip
frames up the stack (zero-based), ignoring frames associated
with java.lang.reflect.Method.invoke() and its implementation.
|
static
boolean
|
quickCheckMemberAccess(Class memberClass, int modifiers)
A quick "fast-path" check to try to avoid getCallerClass()
calls.
|
synchronized
static
void
|
registerFieldsToFilter(Class containingClass, String... fieldNames)
|
synchronized
static
void
|
registerMethodsToFilter(Class containingClass, String... methodNames)
|
static
boolean
|
verifyMemberAccess(Class currentClass, Class memberClass, Object target, int modifiers)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
Public Methods
public
static
void
ensureMemberAccess
(Class currentClass, Class memberClass, Object target, int modifiers)
public
static
Class
getCallerClass
(int realFramesToSkip)
Returns the class of the method realFramesToSkip
frames up the stack (zero-based), ignoring frames associated
with java.lang.reflect.Method.invoke() and its implementation.
The first frame is that associated with this method, so
getCallerClass(0)
returns the Class object for
sun.reflect.Reflection. Frames associated with
java.lang.reflect.Method.invoke() and its implementation are
completely ignored and do not count toward the number of "real"
frames skipped.
public
static
boolean
quickCheckMemberAccess
(Class memberClass, int modifiers)
A quick "fast-path" check to try to avoid getCallerClass()
calls.
public
static
synchronized
void
registerFieldsToFilter
(Class containingClass, String... fieldNames)
public
static
synchronized
void
registerMethodsToFilter
(Class containingClass, String... methodNames)
public
static
boolean
verifyMemberAccess
(Class currentClass, Class memberClass, Object target, int modifiers)