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!).- Since:
- 1.6
- Author:
- Sina Madani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProfilableRunConfiguration.Builder<C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C,B>>
-
Field Summary
Fields Modifier and Type Field Description protected boolean
hasRun
protected int
id
Path
outputFile
protected String
printMarker
protected Collection<ProfileDiagnostic>
profiledStages
boolean
profileExecution
protected Object
result
Path
script
boolean
showResults
protected int
targetRepeats
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProfilableRunConfiguration(ProfilableRunConfiguration other)
protected
ProfilableRunConfiguration(ProfilableRunConfiguration.Builder<?,?> builder)
-
Method Summary
-
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 Detail
-
printMarker
protected String printMarker
-
id
protected int id
-
showResults
public final boolean showResults
-
profileExecution
public final boolean profileExecution
-
script
public final Path script
-
outputFile
public final Path outputFile
-
profiledStages
protected final Collection<ProfileDiagnostic> profiledStages
-
hasRun
protected boolean hasRun
-
result
protected Object result
-
targetRepeats
protected final int targetRepeats
-
-
Constructor Detail
-
ProfilableRunConfiguration
protected ProfilableRunConfiguration(ProfilableRunConfiguration.Builder<?,?> builder)
-
ProfilableRunConfiguration
protected ProfilableRunConfiguration(ProfilableRunConfiguration other)
-
-
Method Detail
-
Builder
public static <C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C,B>> B Builder(Class<C> configClass)
-
findBuilder
protected static <C extends ProfilableRunConfiguration,B extends ProfilableRunConfiguration.Builder<C,B>> Constructor<B> findBuilder(Class<C> configClass)
-
getThrows
public final Object getThrows() throws Exception
- Specified by:
getThrows
in interfaceCheckedSupplier<Object,Exception>
- Throws:
Exception
-
getCurrentRepeat
protected final int getCurrentRepeat()
-
isFirstRepeat
protected final boolean isFirstRepeat()
-
isLastRepeat
protected final boolean isLastRepeat()
-
handleException
protected void handleException(Exception ex)
-
getExecutionTime
public Duration getExecutionTime()
-
getResult
public Object getResult()
-
getId
public int getId()
-
writeOut
public final void writeOut(Object... lines)
-
writeOut
protected void writeOut(Collection<?> lines)
-
-