public class DefaultVisitListenerProvider extends Object implements VisitListenerProvider, Serializable
VisitListenerProvider
.
This implementation just wraps an instance of VisitListener
, always
providing the same.
Constructor and Description |
---|
DefaultVisitListenerProvider(VisitListener listener)
Create a new provider instance from an argument listener.
|
Modifier and Type | Method and Description |
---|---|
VisitListener |
provide()
Provide a
VisitListener instance. |
static VisitListenerProvider[] |
providers(VisitListener... listeners)
Convenience method to construct an array of
DefaultVisitListenerProvider from an array of
VisitListener instances. |
String |
toString() |
public DefaultVisitListenerProvider(VisitListener listener)
listener
- The argument listener.public static VisitListenerProvider[] providers(VisitListener... listeners)
DefaultVisitListenerProvider
from an array of
VisitListener
instances.public final VisitListener provide()
VisitListener
instance.
Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
A VisitListener
shall be provided exactly once per
Context
traversal, i.e. per RenderContext
or
BindContext
.
provide
in interface VisitListenerProvider
VisitListener
instance.VisitListener
,
VisitContext
,
DefaultVisitListenerProvider
Copyright © 2019. All rights reserved.