Class DescribedMethod
A method that can be constructed incrementally in an imperative fashion.
Inheritance
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public class DescribedMethod : DescribedGenericMember, IMethod, ITypeMember, IGenericMember, IMember
Constructors
| Improve this Doc View SourceDescribedMethod(IType, UnqualifiedName, Boolean, IType)
Creates a method from a parent type, a name, a staticness and a return type.
Declaration
public DescribedMethod(IType parentType, UnqualifiedName name, bool isStatic, IType returnType)
Parameters
Type | Name | Description |
---|---|---|
IType | parentType | The method's parent type. |
UnqualifiedName | name | The method's name. |
System.Boolean | isStatic | Tells if the method should be a static method or an instance method. |
IType | returnType | The type of value returned by the method. |
Properties
| Improve this Doc View SourceBaseMethods
Gets the method's base methods.
Declaration
public IReadOnlyList<IMethod> BaseMethods { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IMethod> |
IsConstructor
Indicates if this method is a constructor.
Declaration
public bool IsConstructor { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsStatic
Tells if this is a static method. Non-static methods take a non-null pointer to their parent type as an implicit first arguments. Static methods do not.
Declaration
public bool IsStatic { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Parameters
Gets the method's parameters.
Declaration
public IReadOnlyList<Parameter> Parameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<Parameter> |
ParentType
Gets the type that defines this member, if any.
Declaration
public IType ParentType { get; }
Property Value
Type | Description |
---|---|
IType | The parent type. |
ReturnParameter
Gets the method's return parameter.
Declaration
public Parameter ReturnParameter { get; set; }
Property Value
Type | Description |
---|---|
Parameter |
Methods
| Improve this Doc View SourceAddBaseMethod(IMethod)
Adds a method to this method's base methods.
Declaration
public void AddBaseMethod(IMethod baseMethod)
Parameters
Type | Name | Description |
---|---|---|
IMethod | baseMethod | The base method. |
AddParameter(Parameter)
Adds a parameter to the back of this method's parameter list.
Declaration
public void AddParameter(Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
Parameter | parameter | The parameter to add. |