patterntesting.runtime.log
Class LazyObjectRecorder
java.lang.Object
java.lang.Thread
patterntesting.runtime.log.AbstractLogger
patterntesting.runtime.log.ObjectRecorder
patterntesting.runtime.log.LazyObjectRecorder
- All Implemented Interfaces:
- Runnable
public class LazyObjectRecorder
- extends ObjectRecorder
In contradiction to ObjectRecorder this class only records joinpoints
and return values if they are different from the last record. I.e. If a
return value is always the same for the same joinpoint this pair is only
recorded once.
- Since:
- 1.3.1 (01.09.2013)
- Author:
- oliver (boehm@javatux.de)
|
Method Summary |
void |
log(JoinPoint joinPoint,
Object returnValue)
Both things are logged with this method: the call of a method (joinPoint)
and the return value of this method. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
LazyObjectRecorder
public LazyObjectRecorder()
- Instantiates a new lazy object recorder.
LazyObjectRecorder
public LazyObjectRecorder(File logFile)
- Instantiates a new lazy object recorder.
- Parameters:
logFile - the log file
LazyObjectRecorder
public LazyObjectRecorder(OutputStream ostream)
- Instantiates a new lazy object recorder.
- Parameters:
ostream - the ostream
log
@NullArgsAllowed
public void log(JoinPoint joinPoint,
Object returnValue)
- Both things are logged with this method: the call of a method (joinPoint)
and the return value of this method. Constructors or method of type
'void' are not recorded because the have no return value.
Because the given joinPoint cannot be used as key for a map in
- Overrides:
log in class ObjectRecorder
- Parameters:
joinPoint - the joinpointreturnValue - the return value
ObjectPlayer it is saved as string. As a side effect this will
speedup the serialization stuff and shorten the generated record file.
The given return value will be only stored if it is not the same as the
last time.
Copyright © 2002–2014 PatternTesting Team. All rights reserved.