Package pl.morgwai.base.guice.scopes
Class ContextBoundClosure<ClosureT>
- java.lang.Object
-
- pl.morgwai.base.guice.scopes.ContextBoundClosure<ClosureT>
-
- Direct Known Subclasses:
ContextBoundBiConsumer
,ContextBoundBiFunction
,ContextBoundCallable
,ContextBoundConsumer
,ContextBoundFunction
,ContextBoundRunnable
,ContextBoundSupplier
public abstract class ContextBoundClosure<ClosureT> extends Object
Base class for decorators that execute their wrapped closures within suppliedContexts
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ContextBoundClosure.CallableWrapper<T>
Provides nicetoString()
for wrapped lambdas passed toTrackableContext.executeWithinAll(List, Runnable)
in subclasses.protected class
ContextBoundClosure.RunnableWrapper
Provides nicetoString()
for wrapped lambdas passed toTrackableContext.executeWithinAll(List, Runnable)
in subclasses.
-
Field Summary
Fields Modifier and Type Field Description ClosureT
boundClosure
List<TrackableContext<?>>
contexts
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContextBoundClosure(List<TrackableContext<?>> contexts, ClosureT closureToBind)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClosureT
getBoundClosure()
List<TrackableContext<?>>
getContexts()
String
toString()
-
-
-
Field Detail
-
contexts
public final List<TrackableContext<?>> contexts
-
boundClosure
public final ClosureT boundClosure
-
-
Constructor Detail
-
ContextBoundClosure
protected ContextBoundClosure(List<TrackableContext<?>> contexts, ClosureT closureToBind)
-
-