org.apache.maven.doxia.sink
Class PipelineSink

java.lang.Object
  extended by org.apache.maven.doxia.sink.PipelineSink
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class PipelineSink
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

May be used to invoke the same method on a List of Sinks.

Version:
$Id: PipelineSink.java 763762 2009-04-09 18:19:56Z ltheussl $
Author:
Trygve Laugstøl

Constructor Summary
PipelineSink(java.util.List pipeline)
          Constructs a PipelineSink for a given List of Sinks.
 
Method Summary
 void addSink(Sink sink)
          Add a Sink to the List of Sinks.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           Invoke a Method on this PipelineSink.
static Sink newInstance(java.util.List pipeline)
          Returns an instance of a PipelineSink as a Sink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineSink

public PipelineSink(java.util.List pipeline)
Constructs a PipelineSink for a given List of Sinks.

Parameters:
pipeline - A List of Sinks.
Method Detail

addSink

public void addSink(Sink sink)
Add a Sink to the List of Sinks.

Parameters:
sink - the Sink to add.

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
Invoke a Method on this PipelineSink.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.IllegalAccessException - if any.
java.lang.reflect.InvocationTargetException - if any.

newInstance

public static Sink newInstance(java.util.List pipeline)
Returns an instance of a PipelineSink as a Sink.

Parameters:
pipeline - A List of Sinks.
Returns:
a Sink object.


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.