This class implements IEnumerable to iterate over all possible call arguments.
Public Member Functions | |
| Method (string name, Type retType, IList pars, List attrs, bool _static) | |
| Create new method. | |
| void | setBody (Block body) |
| Set the body of the class. | |
| string | getName () |
| Return the method's name. | |
| int | numParams () |
| Return the number of parameters. | |
| bool | isStatic () |
| Return whether this is a static method. | |
| VariableDecl | getParam (string name) |
| Get the declaration of the parameter with given name. | |
| Type | returnType () |
| Get the return type (null means void). | |
| Attribute | getAttribute (string name) |
| Returns the first attribute that has the given name. | |
| bool | compatibleArgs (IList args) |
| Return whether this method is callable with arguments args (which must be either proper values or Expr derivatives). | |
| bool | isAmbiguous (Method m) |
| Returns wheter this method is ambiguous to the given one (same name and parameters). | |
| Object | execute (IList paramValues) |
| Execute the method with given parameters (which must be proper values). | |
| override string | ToString () |
| IEnumerator | GetEnumerator () |
| Get an iterator over the method parameters. | |
| IEnumerator | getReturnEnumerator () |
| Get an iterator over the return values. | |
Static Public Member Functions | |
| bool | returning () |
| Returns true if a return statement was executed (thus the statements following it must not be executed). | |
| void | setReturn (Object val) |
| Set the returning flag and return the given value. | |
| Variable | getCallParam (string name) |
| Get method parameter value by name (for resolving in expressions). | |
Private Attributes | |
| string | name |
| Type | retType |
| IList | pars |
| Block | body |
| List | attrs |
| bool | _static |
Static Private Attributes | |
| bool | returnFlag = false |
| Object | returnVal = null |
| Stack | calledMethods = new Stack() |
| Stack of currently called methods (of MethodCall). | |
|
||||||||||||||||||||||||
|
Create new method.
|
|
|
Return whether this method is callable with arguments args (which must be either proper values or Expr derivatives).
|
|
|
Execute the method with given parameters (which must be proper values).
|
|
|
Returns the first attribute that has the given name.
|
|
|
Get method parameter value by name (for resolving in expressions).
|
|
|
Get an iterator over the method parameters.
|
|
|
Return the method's name.
|
|
|
Get the declaration of the parameter with given name.
|
|
|
Get an iterator over the return values.
|
|
|
Returns wheter this method is ambiguous to the given one (same name and parameters).
|
|
|
Return whether this is a static method.
|
|
|
Return the number of parameters.
|
|
|
Returns true if a return statement was executed (thus the statements following it must not be executed).
|
|
|
Get the return type (null means void).
|
|
|
Set the body of the class. This can not be done in the constructor, because the parameters are already needed when parsing the body block. |
|
|
Set the returning flag and return the given value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stack of currently called methods (of MethodCall).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.7