randoop.util
Class ReflectionCode
Object
ReflectionCode
- Direct Known Subclasses:
- ConstructorReflectionCode, MethodReflectionCode
public abstract class ReflectionCode
extends Object
Implemented by parts of randoop that want to execute reflection
code via ReflectionExecutor.
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectionCode
public ReflectionCode()
runReflectionCode
public final void runReflectionCode()
throws InstantiationException,
IllegalAccessException,
InvocationTargetException,
ReflectionCode.NotCaughtIllegalStateException
- Runs the reflection code that this object represents, but first, if
System.getSecurityManager() returns a RandoopSecurityManager, this method
sets the security manager's status to ON. Before exiting, this method
sets the security manager's status to its status before this call.
- Throws:
InstantiationException
IllegalAccessException
InvocationTargetException
ReflectionCode.NotCaughtIllegalStateException
runReflectionCodeRaw
protected abstract void runReflectionCodeRaw()
throws InstantiationException,
IllegalAccessException,
InvocationTargetException,
ReflectionCode.NotCaughtIllegalStateException
- Executed the reflection code. All internal exceptions must be thrown as
NotCaughtIllegalStateException because everything else is caught.
- Throws:
InstantiationException
IllegalAccessException
InvocationTargetException
ReflectionCode.NotCaughtIllegalStateException
setRunAlready
protected final void setRunAlready()
getReturnVariable
public abstract Object getReturnVariable()
getExceptionThrown
public abstract Throwable getExceptionThrown()
hasRunAlready
public final boolean hasRunAlready()