public class Arguments extends AbstractList<Arguments.Argument>
PrimitiveCall. PrimitiveCall
can reference either normal IAction, ActionPattern or Competence
that will get these arguments, mix them with their own FormalParameters
and create the values for the Action/C/AP.
Arguments is stored as list of Arguments.Argument, each argument is basically
(key; argument) pair. Arguments are sorted according to the key. What is the
key? Either a variable name or index of the argument in the list or
arguments. Variable names have '$' prefix, e.g. $name. The indexes are simply
string representations of the numbers, e.g. index 3 is represented as "3".
Calling convention:
TODO: Properly document.
TODO: Properly test.
TODO: This probably doesn;t need to be abstract list
Example: call run("street", speed=14.5) will create| Modifier and Type | Class and Description |
|---|---|
static class |
Arguments.Argument |
protected static class |
Arguments.ValueArgument
This parameter is static value, neverchanging.
|
protected static class |
Arguments.VariableArgument
This parameter is dependant on value of some kind of variable.
|
modCount| Modifier | Constructor and Description |
|---|---|
protected |
Arguments()
Create a new list of call parameters.
|
protected |
Arguments(Arguments parameters)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addFormal(Arguments.Argument element,
FormalParameters formalParams) |
Arguments.Argument |
get(int index) |
int |
size() |
String |
toString()
Get string representation of arguments (comma separated arguments,
compatible with lap).
|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayprotected Arguments()
Every added variable parameter has to be checked against list of formal parameters.
protected Arguments(Arguments parameters)
parameters - orginalpublic Arguments.Argument get(int index)
get in interface List<Arguments.Argument>get in class AbstractList<Arguments.Argument>public int size()
size in interface Collection<Arguments.Argument>size in interface List<Arguments.Argument>size in class AbstractCollection<Arguments.Argument>public boolean addFormal(Arguments.Argument element, FormalParameters formalParams)
public String toString()
toString in class AbstractCollection<Arguments.Argument>Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.