C# Class Pchp.CodeAnalysis.Symbols.OverrideHelper

Helper class resolving overriden method.
Afficher le fichier Open project: iolevel/peachpie Class Usage Examples

Méthodes publiques

Méthode Description
CanBeOverride ( SourceMethodSymbol method, MethodSymbol basemethod ) : bool

Determines whether method can override basemethod.

OverrideCost ( SourceMethodSymbol method, MethodSymbol basemethod ) : ConversionCost

Calculates override cost, i.e. whether the override is possible and its value. In case of more possible overrides, the one with better cost is selected.

ResolveOverride ( this method ) : MethodSymbol

Resolves best method to be overriden.

SignaturesMatch ( this a, MethodSymbol b ) : bool

Checks whether signatures of two methods match exactly so one can override the second.

Private Methods

Méthode Description
EnumerateOverridableTypes ( NamedTypeSymbol type ) : IEnumerable

Enumerates base types and interfaces of given type (i.e. types that can contain methods that can be overriden).

IsAllowedCost ( ConversionCost cost ) : bool

Method Details

CanBeOverride() public static méthode

Determines whether method can override basemethod.
public static CanBeOverride ( SourceMethodSymbol method, MethodSymbol basemethod ) : bool
method SourceMethodSymbol Source method.
basemethod MethodSymbol Overriden method.
Résultat bool

OverrideCost() public static méthode

Calculates override cost, i.e. whether the override is possible and its value. In case of more possible overrides, the one with better cost is selected.
public static OverrideCost ( SourceMethodSymbol method, MethodSymbol basemethod ) : ConversionCost
method SourceMethodSymbol Source method.
basemethod MethodSymbol A hypothetical base method.
Résultat ConversionCost

ResolveOverride() public static méthode

Resolves best method to be overriden.
public static ResolveOverride ( this method ) : MethodSymbol
method this The override.
Résultat MethodSymbol

SignaturesMatch() public static méthode

Checks whether signatures of two methods match exactly so one can override the second.
public static SignaturesMatch ( this a, MethodSymbol b ) : bool
a this
b MethodSymbol
Résultat bool