org.epics.pvmanager.expression
Class WriteExpressionImpl<W>

java.lang.Object
  extended by org.epics.pvmanager.expression.WriteExpressionListImpl<W>
      extended by org.epics.pvmanager.expression.WriteExpressionImpl<W>
Type Parameters:
W - type of the write payload
All Implemented Interfaces:
WriteExpression<W>, WriteExpressionList<W>

public class WriteExpressionImpl<W>
extends WriteExpressionListImpl<W>
implements WriteExpression<W>

Implementation class for WriteExpression.

Author:
carcassi

Constructor Summary
WriteExpressionImpl(java.lang.String channelName)
          Constructor that represents a single channel of a particular type.
WriteExpressionImpl(WriteExpressionList<?> childExpressions, WriteFunction<W> function, java.lang.String defaultName)
          Creates a new write expression.
 
Method Summary
 WriteExpression<W> as(java.lang.String name)
          Changes the name for this expression
 WriteBuffer createWriteBuffer()
          Creates a data recipe for the given expression.
 java.lang.String getName()
          Name representation of the expression.
 WriteExpressionImpl<W> getWriteExpressionImpl()
          The implementation of this expression.
 WriteFunction<W> getWriteFunction()
          Returns the function represented by this expression.
 
Methods inherited from class org.epics.pvmanager.expression.WriteExpressionListImpl
and, getWriteExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.epics.pvmanager.expression.WriteExpressionList
and, getWriteExpressions
 

Constructor Detail

WriteExpressionImpl

public WriteExpressionImpl(java.lang.String channelName)
Constructor that represents a single channel of a particular type.

Parameters:
channelName - the name of the channel

WriteExpressionImpl

public WriteExpressionImpl(WriteExpressionList<?> childExpressions,
                           WriteFunction<W> function,
                           java.lang.String defaultName)
Creates a new write expression.

Parameters:
childExpressions - the expressions used as arguments by this expression
function - the function that will decompose the payload for this expression
defaultName - the name for this expression
Method Detail

as

public final WriteExpression<W> as(java.lang.String name)
Changes the name for this expression

Parameters:
name - new name
Returns:
this

getName

public final java.lang.String getName()
Name representation of the expression.

Specified by:
getName in interface WriteExpression<W>
Returns:
a name

getWriteFunction

public final WriteFunction<W> getWriteFunction()
Returns the function represented by this expression.

Specified by:
getWriteFunction in interface WriteExpression<W>
Returns:
the function

createWriteBuffer

public final WriteBuffer createWriteBuffer()
Creates a data recipe for the given expression.

Specified by:
createWriteBuffer in interface WriteExpression<W>
Returns:
a data recipe

getWriteExpressionImpl

public final WriteExpressionImpl<W> getWriteExpressionImpl()
Description copied from interface: WriteExpression
The implementation of this expression.

Specified by:
getWriteExpressionImpl in interface WriteExpression<W>
Returns:
the implementation