Class IrMethod
A method that is decoded from a Flame IR method LNode.
Inherited Members
Namespace: Flame.Ir
Assembly: Flame.Ir.dll
Syntax
public class IrMethod : IrMember, IBodyMethod, IMethod, ITypeMember, IGenericMember, IMember
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> |
Body
Gets the method body for this method.
Declaration
public MethodBody Body { get; }
Property Value
Type | Description |
---|---|
MethodBody | A method body. |
GenericParameters
Gets the list of generic parameters for this generic member.
Declaration
public IReadOnlyList<IGenericParameter> GenericParameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IGenericParameter> | The generic parameters. |
IsConstructor
Indicates if this method is a constructor.
Declaration
public bool IsConstructor { get; }
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; }
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; }
Property Value
Type | Description |
---|---|
Parameter |
Methods
| Improve this Doc View SourceDecode(LNode, DecoderState)
Decodes a method from an LNode.
Declaration
public static IMethod Decode(LNode data, DecoderState state)
Parameters
Type | Name | Description |
---|---|---|
Loyc.Syntax.LNode | data | The LNode to decode. |
DecoderState | state | The decoder to use. |
Returns
Type | Description |
---|---|
IMethod | A decoded method if the node can be decoded;
otherwise, |
Encode(IMethod, EncoderState)
Encodes a method as an LNode.
Declaration
public static LNode Encode(IMethod value, EncoderState state)
Parameters
Type | Name | Description |
---|---|---|
IMethod | value | The method to encode. |
EncoderState | state | The encoder to use. |
Returns
Type | Description |
---|---|
Loyc.Syntax.LNode | An LNode that represents the method. |