Class ConstantExpression
- java.lang.Object
-
- com.inductiveautomation.ignition.common.expressions.ConstantExpression
-
- All Implemented Interfaces:
Expression
public class ConstantExpression extends java.lang.Object implements Expression
-
-
Constructor Summary
Constructors Constructor Description ConstantExpression()
ConstantExpression(java.lang.Object value)
ConstantExpression(java.lang.Object value, QualityCode quality)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(CommonContext context, InteractionListener updateListener)
Gives the expression a chance to connect itself to things, if necessary.void
disconnect()
Tells the expression to disconnect from anything it was connected to.QualifiedValue
execute()
Compute and return the value of this expressionExpression[]
getChildren()
The children (if any) that this expression is dependent on for its executionjava.lang.String
getOpName()
Return a human-readable name for the operation that this expression performsQualityCode
getQuality()
java.lang.Class<?>
getType()
Return the type that this expression will returnjava.lang.Object
getValue()
void
setQuality(QualityCode quality)
void
setValue(java.lang.Object object)
void
shutdown()
Tells the expression to shutdown any polling operations.void
startup()
Tells the expression to startup any polling operations.
-
-
-
Constructor Detail
-
ConstantExpression
public ConstantExpression(java.lang.Object value)
-
ConstantExpression
public ConstantExpression(java.lang.Object value, QualityCode quality)
-
ConstantExpression
public ConstantExpression()
-
-
Method Detail
-
execute
@Nonnull public QualifiedValue execute()
Description copied from interface:Expression
Compute and return the value of this expression- Specified by:
execute
in interfaceExpression
-
getType
public java.lang.Class<?> getType()
Description copied from interface:Expression
Return the type that this expression will return- Specified by:
getType
in interfaceExpression
-
getOpName
public java.lang.String getOpName()
Description copied from interface:Expression
Return a human-readable name for the operation that this expression performs- Specified by:
getOpName
in interfaceExpression
-
getChildren
public Expression[] getChildren()
Description copied from interface:Expression
The children (if any) that this expression is dependent on for its execution- Specified by:
getChildren
in interfaceExpression
-
getValue
public java.lang.Object getValue()
-
setValue
public void setValue(java.lang.Object object)
-
getQuality
public QualityCode getQuality()
-
setQuality
public void setQuality(QualityCode quality)
-
connect
public void connect(CommonContext context, InteractionListener updateListener)
Description copied from interface:Expression
Gives the expression a chance to connect itself to things, if necessary. Most expressions do not have any connections. An expression should notify the updateListener if they change.- Specified by:
connect
in interfaceExpression
-
disconnect
public void disconnect()
Description copied from interface:Expression
Tells the expression to disconnect from anything it was connected to.- Specified by:
disconnect
in interfaceExpression
-
shutdown
public void shutdown()
Description copied from interface:Expression
Tells the expression to shutdown any polling operations.- Specified by:
shutdown
in interfaceExpression
-
startup
public void startup()
Description copied from interface:Expression
Tells the expression to startup any polling operations. Expressions that use this can remember the updateListener from connect() to feed update notification to.- Specified by:
startup
in interfaceExpression
-
-