18 using System.Collections.Generic;
23 using ErrorManagement;
40 private List<Parameter> parametersInfo;
45 private List<Modifier> modifiersInfo;
50 private string returnTypeInfo;
55 private bool isReturnDynamic;
65 get {
return this.modifiersInfo; }
72 get {
return this.parametersInfo; }
79 get {
return this.returnTypeInfo; }
80 protected set { this.returnTypeInfo = value; }
87 get {
return this.isReturnDynamic; }
88 set { this.isReturnDynamic = value; }
105 : base(id, null, location) {
106 this.parametersInfo = parameters;
107 if (parameters == null)
108 this.parametersInfo =
new List<Parameter>();
109 this.modifiersInfo = modifiers;
110 this.returnTypeInfo = returnType;
115 #region SearchParam()
123 for (
int i = 0; i < this.parametersInfo.Count; i++) {
124 if (this.parametersInfo[i].
Identifier.Equals(param))
141 return v.Visit(
this, o);
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Encapsulates a identifier expression of our programming language.
Encapsulates a declaration of a concrete method.
List< Parameter > ParametersInfo
Gets the parameters information used to obtain its type
MethodDeclaration(SingleIdentifierExpression id, string returnType, List< Parameter > parameters, List< Modifier > modifiers, Location location)
Constructor of MethodDeclaration.
bool IsReturnDynamic
Gets or sets true if the return expression is a dynamic reference. Otherwise false.
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
string ReturnTypeInfo
Gets the information of the return type
Encapsulates a declaration.
Location location
Location: Encapsulates in one object the line, column and filename
string Identifier
Gets the name associated to the declaration
bool SearchParam(string param)
Searches the specified param in the method parameter list.
List< Modifier > ModifiersInfo
Gets the modifiers information used to obtain its type