Class ProfilableRunConfiguration
java.lang.Object
org.eclipse.epsilon.common.launch.ProfilableRunConfiguration
- All Implemented Interfaces:
Runnable
,Callable<Object>
,Supplier<Object>
,CheckedSupplier<Object,
Exception>
- Direct Known Subclasses:
EolRunConfiguration
public abstract class ProfilableRunConfiguration
extends Object
implements Runnable, Callable<Object>, CheckedSupplier<Object,Exception>
Generic utility class for building standalone applications with support for:
- Multi-stage, detailed AST profiling
- Writing to output files
- Identifying and comparing configurations
- Displaying results
- Building configurations using an elegant builder syntax
... and more
The intention is that this class is used as a base for building more complex standalone run configurations which can be built and invoked easily (at least, from the client's perspective!).
- Multi-stage, detailed AST profiling
- Writing to output files
- Identifying and comparing configurations
- Displaying results
- Building configurations using an elegant builder syntax
... and more
The intention is that this class is used as a base for building more complex standalone run configurations which can be built and invoked easily (at least, from the client's perspective!).
- Since:
- 1.6
- Author:
- Sina Madani
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ProfilableRunConfiguration.Builder<C extends ProfilableRunConfiguration,
B extends ProfilableRunConfiguration.Builder<C, B>> -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected int
final Path
protected String
protected final Collection<ProfileDiagnostic>
final boolean
protected Object
final Path
final boolean
protected final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
ProfilableRunConfiguration
(ProfilableRunConfiguration.Builder<?, ?> builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
static <C extends ProfilableRunConfiguration,
B extends ProfilableRunConfiguration.Builder<C, B>>
Bfinal Object
call()
boolean
protected abstract Object
execute()
protected static <C extends ProfilableRunConfiguration,
B extends ProfilableRunConfiguration.Builder<C, B>>
Constructor<B>findBuilder
(Class<C> configClass) protected final int
int
getId()
final Object
protected void
int
hashCode()
protected final boolean
protected final boolean
protected void
protected void
protected void
reset()
final void
run()
toString()
final void
protected void
writeOut
(Collection<?> lines) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.epsilon.common.function.CheckedSupplier
get
-
Field Details
-
printMarker
-
id
protected int id -
showResults
public final boolean showResults -
profileExecution
public final boolean profileExecution -
script
-
outputFile
-
profiledStages
-
hasRun
protected boolean hasRun -
result
-
targetRepeats
protected final int targetRepeats
-
-
Constructor Details
-
ProfilableRunConfiguration
-
ProfilableRunConfiguration
-
-
Method Details
-
Builder
public static <C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C, B BuilderB>> (Class<C> configClass) -
findBuilder
protected static <C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C, Constructor<B> findBuilderB>> (Class<C> configClass) -
getThrows
- Specified by:
getThrows
in interfaceCheckedSupplier<Object,
Exception> - Throws:
Exception
-
call
-
beforeRepeatLoop
- Throws:
Exception
-
afterRepeatLoop
- Throws:
Exception
-
getCurrentRepeat
protected final int getCurrentRepeat() -
isFirstRepeat
protected final boolean isFirstRepeat() -
isLastRepeat
protected final boolean isLastRepeat() -
run
public final void run() -
handleException
-
preExecute
- Throws:
Exception
-
execute
- Throws:
Exception
-
getProfilingOutput
-
getResultOutput
-
postExecute
- Throws:
Exception
-
reset
- Throws:
Exception
-
getExecutionTime
-
getResult
-
getId
public int getId() -
writeOut
-
writeOut
-
toString
-
hashCode
public int hashCode() -
equals
-