ABB.Swum.ConstructorRule.ConstructSwum C# (CSharp) Method

ConstructSwum() public method

Constructs the Software Word Use Model for the given node. This method assumes that the node has already been tested to satisfy this Rule, using the InClass method.
public ConstructSwum ( ProgramElementNode node ) : void
node ABB.Swum.Nodes.ProgramElementNode The node to construct SWUM for.
return void
        public override void ConstructSwum(ProgramElementNode node)
        {
            if (node is MethodDeclarationNode)
            {
                MethodDeclarationNode mdn = (MethodDeclarationNode)node;
                mdn.Parse(this.Splitter);
                this.PosTagger.TagNounPhrase(mdn.ParsedName);

                mdn.AssignStructuralInformation(this.Splitter, this.PosTagger);
                mdn.Theme = mdn.ParsedName;
                mdn.AddUnknownArguments(mdn.FormalParameters);

                //TODO: from Emily, how to fill in Action?
                mdn.IsConstructor = true;
                mdn.SwumRuleUsed = this;
            }
            else
            {
                //TODO: return error?
            }
        }
    }