Package gnu.expr
Class ConsumerTarget
- java.lang.Object
-
- gnu.expr.Target
-
- gnu.expr.ConsumerTarget
-
public class ConsumerTarget extends Target
A Target which is some variable that implements gnu.lists.Consumer.
-
-
Field Summary
Fields Modifier and Type Field Description static ConsumerTarget
contextInstance
static ClassType
typeSequences
-
Fields inherited from class gnu.expr.Target
Ignore, pushObject
-
-
Constructor Summary
Constructors Constructor Description ConsumerTarget(Variable consumer)
ConsumerTarget(Variable consumer, Type type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compileFromStack(Compilation comp, Type stackType)
static void
compileUsingConsumer(Expression exp, Compilation comp, Target target)
Compile an expression using a temporary Consumer, if needed.static void
compileUsingConsumer(Expression exp, Compilation comp, Target target, Method makeMethod, Method resultMethod)
static void
compileUsingValues(Expression exp, Compilation comp, Target target)
boolean
compileWrite(Expression exp, Compilation comp)
Variable
getConsumerVariable()
ConsumerTarget
getSingleTarget()
Get equivalent target but which only accepts a single item.Type
getType()
boolean
isContextTarget()
True iff this target is the current CallContext's current Consumer.static Target
makeContextTarget(Compilation comp, Type type)
Make a Target that uses the current CallContext's current Consumer.
-
-
-
Field Detail
-
contextInstance
public static final ConsumerTarget contextInstance
-
typeSequences
public static final ClassType typeSequences
-
-
Method Detail
-
getSingleTarget
public ConsumerTarget getSingleTarget()
Get equivalent target but which only accepts a single item.
-
getConsumerVariable
public Variable getConsumerVariable()
-
isContextTarget
public final boolean isContextTarget()
True iff this target is the current CallContext's current Consumer.
-
makeContextTarget
public static Target makeContextTarget(Compilation comp, Type type)
Make a Target that uses the current CallContext's current Consumer.
-
compileUsingValues
public static void compileUsingValues(Expression exp, Compilation comp, Target target)
-
compileUsingConsumer
public static void compileUsingConsumer(Expression exp, Compilation comp, Target target)
Compile an expression using a temporary Consumer, if needed.
-
compileUsingConsumer
public static void compileUsingConsumer(Expression exp, Compilation comp, Target target, Method makeMethod, Method resultMethod)
-
compileFromStack
public void compileFromStack(Compilation comp, Type stackType)
- Specified by:
compileFromStack
in classTarget
-
compileWrite
public boolean compileWrite(Expression exp, Compilation comp)
-
-