public class DefaultVisitListenerProvider extends java.lang.Object implements VisitListenerProvider, java.io.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. |
java.lang.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
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014. All Rights Reserved.