public class Misc
extends java.lang.Object
Unit test JavaReflectionTest covers the reflection oriented methods in this class.
Constructor and Description |
---|
Misc() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getFullMethodName(java.lang.Class<?> theClass,
java.lang.String name,
java.lang.Object[] args)
Returns the method name followed by the class names of the arguments.
|
static java.lang.String |
getFullMethodName(java.lang.String methodName,
java.lang.Object[] arguments) |
static java.lang.Class<?>[] |
getSignatureFromArguments(java.lang.Object[] args)
Given an
Object[] array, returns the corresponding
Class[] array. |
static void |
removeAllPropertyChangeListeners(PropertyChangeSource source)
Removes all of the PropertyChangeListners currently registers with the
given PropertChangeSource.
|
static void |
removeAllSimEventListeners(SimEventSource source)
Removes all of the SimEventListners currently registers with the given
SimEventSource.
|
public static java.lang.Class<?>[] getSignatureFromArguments(java.lang.Object[] args)
Object[]
array, returns the corresponding
Class[]
array.args
- The Object[]
array we want the signature for.Class[]
representing the signature of the
argument array.public static java.lang.String getFullMethodName(java.lang.String methodName, java.lang.Object[] arguments)
methodName
- Given method namearguments
- Given array of argumentspublic static java.lang.String getFullMethodName(java.lang.Class<?> theClass, java.lang.String name, java.lang.Object[] args)
public void
methods.theClass
- The Class that contains the method.name
- The name of the method.args
- An array containing the arguments for the method.public static void removeAllSimEventListeners(SimEventSource source)
source
- Given SimEventSourcepublic static void removeAllPropertyChangeListeners(PropertyChangeSource source)
source
- given PropertChangeSource