Package org.jooq.impl
Class DefaultVisitListenerProvider
- java.lang.Object
-
- org.jooq.impl.DefaultVisitListenerProvider
-
- All Implemented Interfaces:
java.io.Serializable
,VisitListenerProvider
public class DefaultVisitListenerProvider extends java.lang.Object implements VisitListenerProvider, java.io.Serializable
A default implementation forVisitListenerProvider
.This implementation just wraps an instance of
VisitListener
, always providing the same.- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultVisitListenerProvider(VisitListener listener)
Create a new provider instance from an argument listener.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VisitListener
provide()
Provide aVisitListener
instance.static VisitListenerProvider[]
providers(VisitListener... listeners)
Convenience method to construct an array ofDefaultVisitListenerProvider
from an array ofVisitListener
instances.java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultVisitListenerProvider
public DefaultVisitListenerProvider(VisitListener listener)
Create a new provider instance from an argument listener.- Parameters:
listener
- The argument listener.
-
-
Method Detail
-
providers
public static VisitListenerProvider[] providers(VisitListener... listeners)
Convenience method to construct an array ofDefaultVisitListenerProvider
from an array ofVisitListener
instances.
-
provide
public final VisitListener provide()
Description copied from interface:VisitListenerProvider
Provide aVisitListener
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 perContext
traversal, i.e. perRenderContext
orBindContext
.- Specified by:
provide
in interfaceVisitListenerProvider
- Returns:
- A
VisitListener
instance. - See Also:
VisitListener
,VisitContext
,DefaultVisitListenerProvider
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-