Class DescribedType
A type that can be constructed incrementally in an imperative fashion.
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public class DescribedType : DescribedGenericMember, IType, IGenericMember, IMember
Constructors
| Improve this Doc View SourceDescribedType(QualifiedName, IAssembly)
Creates a type from a name and a parent assembly.
Declaration
public DescribedType(QualifiedName fullName, IAssembly assembly)
Parameters
Type | Name | Description |
---|---|---|
QualifiedName | fullName | The type's full name. |
IAssembly | assembly | The assembly that defines the type. |
DescribedType(UnqualifiedName, IType)
Creates a type from a name and a parent type.
Declaration
public DescribedType(UnqualifiedName name, IType parentType)
Parameters
Type | Name | Description |
---|---|---|
UnqualifiedName | name | The type's unqualified name. |
IType | parentType | The type's parent type, i.e., the type that defines it. |
Properties
| Improve this Doc View SourceBaseTypes
Gets this type's base types. Base types can be either classes or interfaces.
Declaration
public IReadOnlyList<IType> BaseTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IType> | A read-only list of base types. |
Fields
Gets this type's fields.
Declaration
public IReadOnlyList<IField> Fields { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IField> | A read-only list of fields. |
Methods
Gets this type's methods.
Declaration
public IReadOnlyList<IMethod> Methods { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IMethod> | A read-only list of methods. |
NestedTypes
Gets the nested types defined by this type.
Declaration
public IReadOnlyList<IType> NestedTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IType> | A read-only list of nested types. |
Parent
Gets the parent entity that defines and owns this type.
Declaration
public TypeParent Parent { get; }
Property Value
Type | Description |
---|---|
TypeParent | The parent entity. |
Properties
Gets this type's properties.
Declaration
public IReadOnlyList<IProperty> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<IProperty> | A read-only list of properties. |
Methods
| Improve this Doc View SourceAddBaseType(IType)
Makes a particular type a base type of this type.
Declaration
public void AddBaseType(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type to add to this type's base type list. |
AddField(IField)
Adds a field to this type.
Declaration
public void AddField(IField field)
Parameters
Type | Name | Description |
---|---|---|
IField | field | The field to add. |
AddMethod(IMethod)
Adds a method to this type.
Declaration
public void AddMethod(IMethod method)
Parameters
Type | Name | Description |
---|---|---|
IMethod | method | The method to add. |
AddNestedType(IType)
Adds a nested type to this type.
Declaration
public void AddNestedType(IType nestedType)
Parameters
Type | Name | Description |
---|---|---|
IType | nestedType | The nested type to add. |
AddProperty(IProperty)
Adds a property to this type.
Declaration
public void AddProperty(IProperty property)
Parameters
Type | Name | Description |
---|---|---|
IProperty | property | The property to add. |