Search Results for

    Show / Hide Table of Contents

    Class NullCheckExceptionSpecification

    An exception specification for an instruction parameter null check.

    Inheritance
    object
    ExceptionSpecification
    NullCheckExceptionSpecification
    Inherited Members
    ExceptionSpecification.NoThrow
    ExceptionSpecification.ThrowAny
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler.Analysis
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class NullCheckExceptionSpecification : ExceptionSpecification

    Constructors

    | Edit this page View Source

    NullCheckExceptionSpecification(int, ExceptionSpecification)

    Creates a null-check exception specification.

    Declaration
    public NullCheckExceptionSpecification(int parameterIndex, ExceptionSpecification nullCheckSpec)
    Parameters
    Type Name Description
    int parameterIndex

    The index of the instruction parameter that is null checked.

    ExceptionSpecification nullCheckSpec

    The exception specification of the exception thrown if and when a null check fails.

    | Edit this page View Source

    NullCheckExceptionSpecification(int, IType)

    Creates a null-check exception specification.

    Declaration
    public NullCheckExceptionSpecification(int parameterIndex, IType exceptionType)
    Parameters
    Type Name Description
    int parameterIndex

    The index of the instruction parameter that is null checked.

    IType exceptionType

    The type of exception that is thrown if and when a null check fails.

    Properties

    | Edit this page View Source

    CanThrowSomething

    Tells if this exception specification allows for any exceptions at all to be thrown.

    Declaration
    public override bool CanThrowSomething { get; }
    Property Value
    Type Description
    bool

    true if this exception specification allows for at least one type of exception to be thrown; otherwise, false.

    Overrides
    ExceptionSpecification.CanThrowSomething
    | Edit this page View Source

    NullCheckSpec

    Gets the exception specification of the exception thrown if and when a null check fails.

    Declaration
    public ExceptionSpecification NullCheckSpec { get; }
    Property Value
    Type Description
    ExceptionSpecification

    An exception specification.

    | Edit this page View Source

    ParameterIndex

    Gets the index of the null-checked parameter,

    Declaration
    public int ParameterIndex { get; }
    Property Value
    Type Description
    int

    The index of the null-checked parameter.

    Methods

    | Edit this page View Source

    CanThrow(IType)

    Tells if this exception specification allows for an exception of a particular type or a derived type to be thrown.

    Declaration
    public override bool CanThrow(IType exceptionType)
    Parameters
    Type Name Description
    IType exceptionType

    The type of exception to examine.

    Returns
    Type Description
    bool

    true if an exception of type exceptionType or a derived type can be thrown; otherwise, false.

    Overrides
    ExceptionSpecification.CanThrow(IType)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX