Package org.apache.maven.doxia.sink.impl
Class PipelineSink
- java.lang.Object
-
- org.apache.maven.doxia.sink.impl.PipelineSink
-
- All Implemented Interfaces:
InvocationHandler
public class PipelineSink extends Object implements InvocationHandler
May be used to invoke the same method on a List of Sinks.- Author:
- Trygve Laugstøl
-
-
Constructor Summary
Constructors Constructor Description PipelineSink(List<Sink> pipeline)
Constructs a PipelineSink for a given List of Sinks.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSink(Sink sink)
Add a Sink to the List of Sinks.Object
invoke(Object proxy, Method method, Object[] args)
Invoke a Method on this PipelineSink.static Sink
newInstance(List<Sink> pipeline)
Returns an instance of a PipelineSink as a Sink.
-
-
-
Method Detail
-
addSink
public void addSink(Sink sink)
Add a Sink to the List of Sinks.- Parameters:
sink
- the Sink to add.
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException
Invoke a Method on this PipelineSink.- Specified by:
invoke
in interfaceInvocationHandler
- Parameters:
proxy
- aObject
object.method
- aMethod
object.args
- an array ofObject
objects.- Returns:
- a
Object
object. - Throws:
IllegalAccessException
- if any.InvocationTargetException
- if any.
-
-