This represents a set of methods each with the same name and return type. It's used by classes being compiled to track the methods within them.
Public Member Functions | |
MethodOverloads (Type returnType) | |
Creates a new method overloads set. All methods must have the same return type. More... | |
void | AddMethod (CompiledMethod method) |
Adds a method to this overload set. More... | |
void | ParametersOk (CompiledMethod method) |
Makes sure that two overloads don't have the same parameter set. Throws an error if More... | |
MethodInfo | GetOverload (Type[] arguments) |
Gets the overload from this set that suits the given arguments. More... | |
void | CompileParameters () |
Compiles the parameter block for all methods in this set. More... | |
void | CompileBody () |
Compiles the body of all methods in this set. More... | |
Public Attributes | |
Type | ReturnType |
The return type of all methods in this set. More... | |
List< CompiledMethod > | Methods =new List<CompiledMethod>() |
The set of overloaded methods. More... | |
Private Member Functions | |
bool | NewBaseCall (CodeFragment fragment) |
Looks for base.new in the given fragment. More... | |
|
inline |
Creates a new method overloads set. All methods must have the same return type.
returnType | The return type of all methods in this set. |
|
inline |
Adds a method to this overload set.
method | The method to add. |
|
inline |
Compiles the body of all methods in this set.
|
inline |
Compiles the parameter block for all methods in this set.
|
inline |
Gets the overload from this set that suits the given arguments.
arguments | The types of the arguments being provided. |
|
inlineprivate |
Looks for base.new in the given fragment.
fragment | The code fragment to look in. |
|
inline |
Makes sure that two overloads don't have the same parameter set. Throws an error if
method | The method to check for matches against existing methods in this set. |
List<CompiledMethod> Nitro.MethodOverloads.Methods =new List<CompiledMethod>() |
The set of overloaded methods.
Type Nitro.MethodOverloads.ReturnType |
The return type of all methods in this set.