C# Class ABB.Swum.Nodes.MethodDeclarationNode

Represents a method declaration in the program.
Inheritance: ProgramElementNode
Afficher le fichier Open project: abb-iss/Swum.NET Class Usage Examples

Méthodes publiques

Méthode Description
AddSecondaryArgument ( Node argument, WordNode preposition ) : void

Creates a new ArgumentNode from the given parameters, and adds it to the SecondaryArguments list.

AddUnknownArgument ( Node argument ) : void

Adds the given argument to the UnknownArguments list.

AddUnknownArguments ( IEnumerable arguments ) : void

Adds the given arguments to the UnknownArguments list.

AssignStructuralInformation ( IdSplitter splitter, Tagger tagger ) : void

Initializes the fields containing structural information about the method. This includes the location, return type and parameters.

ClearSecondaryArguments ( ) : void

Clears the list of SecondaryArguments.

ClearUnknownArguments ( ) : void

Clears the list of UnknownArguments.

CreateEquivalenceFromUnknownArguments ( Node equivalentNode, IEnumerable equivalentUnknownArgs ) : EquivalenceNode

Creates a new EquivalenceNode containing the passed node and the specified nodes from the UnknownArguments list. The arguments are removed from the UnknownArguments list after being added to the EquivalenceNode.

CreateEquivalenceFromUnknownArguments ( Node equivalentNode, bool equivalentUnknownArgs ) : EquivalenceNode

Creates a new EquivalenceNode containing the passed node and the specified nodes from the UnknownArguments list. The arguments are removed from the UnknownArguments list after being added to the EquivalenceNode.

CreateThemeFromPhrases ( PhraseNode phrase1, PhraseNode phrase2 ) : void

Concatenates the given phrases and assigns the result to Theme. ** Note that this will potentially modify phrase1. **

MethodDeclarationNode ( string name ) : System

Creates a new MethodDeclarationNode with the given method name.

MethodDeclarationNode ( string name, MethodContext context ) : System

Creates a new MethodDeclarationNode with the given method name and context.

ToString ( ) : string

Creates a string representation of the node, which contains the action, theme and arguments.

Method Details

AddSecondaryArgument() public méthode

Creates a new ArgumentNode from the given parameters, and adds it to the SecondaryArguments list.
public AddSecondaryArgument ( Node argument, WordNode preposition ) : void
argument Node The node that is serving as the argument.
preposition WordNode The preposition describing the argument's relation to the method.
Résultat void

AddUnknownArgument() public méthode

Adds the given argument to the UnknownArguments list.
public AddUnknownArgument ( Node argument ) : void
argument Node A Node corresponding to the argument to add.
Résultat void

AddUnknownArguments() public méthode

Adds the given arguments to the UnknownArguments list.
public AddUnknownArguments ( IEnumerable arguments ) : void
arguments IEnumerable A collection of the arguments to add.
Résultat void

AssignStructuralInformation() public méthode

Initializes the fields containing structural information about the method. This includes the location, return type and parameters.
splitter is null. tagger is null. Context property is not set.
public AssignStructuralInformation ( IdSplitter splitter, Tagger tagger ) : void
splitter IdSplitter An IdSplitter to split the method name into words.
tagger Tagger A Tagger to tag the parts-of-speech of the name.
Résultat void

ClearSecondaryArguments() public méthode

Clears the list of SecondaryArguments.
public ClearSecondaryArguments ( ) : void
Résultat void

ClearUnknownArguments() public méthode

Clears the list of UnknownArguments.
public ClearUnknownArguments ( ) : void
Résultat void

CreateEquivalenceFromUnknownArguments() public méthode

Creates a new EquivalenceNode containing the passed node and the specified nodes from the UnknownArguments list. The arguments are removed from the UnknownArguments list after being added to the EquivalenceNode.
equivalentNode is null. equivalentUnknownArgs is null.
public CreateEquivalenceFromUnknownArguments ( Node equivalentNode, IEnumerable equivalentUnknownArgs ) : EquivalenceNode
equivalentNode Node The first node to add to the EquivalenceNode, i.e. the node that the unknown arguments are equivalent with.
equivalentUnknownArgs IEnumerable The UnknownArguments to include in the equivalence.
Résultat EquivalenceNode

CreateEquivalenceFromUnknownArguments() public méthode

Creates a new EquivalenceNode containing the passed node and the specified nodes from the UnknownArguments list. The arguments are removed from the UnknownArguments list after being added to the EquivalenceNode.
equivalentNode is null. The length of equivalentUnknownArgs is not the same as the UnknownArguments property of the MethodDeclarationNode.
public CreateEquivalenceFromUnknownArguments ( Node equivalentNode, bool equivalentUnknownArgs ) : EquivalenceNode
equivalentNode Node The first node to add to the EquivalenceNode, i.e. the node that the unknown arguments are equivalent with.
equivalentUnknownArgs bool An array of booleans indicating which unknown arguments to include in the equivalence. /// This array must be the same length as the UnknownArguments list. /// For each element in the array, a value of True means to include the corresponding unknown argument, False means to not include it.
Résultat EquivalenceNode

CreateThemeFromPhrases() public méthode

Concatenates the given phrases and assigns the result to Theme. ** Note that this will potentially modify phrase1. **
public CreateThemeFromPhrases ( PhraseNode phrase1, PhraseNode phrase2 ) : void
phrase1 PhraseNode The first phrase.
phrase2 PhraseNode The second phrase.
Résultat void

MethodDeclarationNode() public méthode

Creates a new MethodDeclarationNode with the given method name.
public MethodDeclarationNode ( string name ) : System
name string The name of the method.
Résultat System

MethodDeclarationNode() public méthode

Creates a new MethodDeclarationNode with the given method name and context.
public MethodDeclarationNode ( string name, MethodContext context ) : System
name string The name of the method.
context MethodContext The method's context.
Résultat System

ToString() public méthode

Creates a string representation of the node, which contains the action, theme and arguments.
public ToString ( ) : string
Résultat string