1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
8
namespace ICSharpCode.NRefactory.VB.Ast
11
/// Description of QualifiedType.
13
public class QualifiedType : AstType
15
public static readonly Role<AstType> TargetRole = new Role<AstType>("Target", AstType.Null);
17
public AstType Target {
18
get { return GetChildByRole(TargetRole); }
19
set { SetChildByRole(TargetRole, value); }
24
return GetChildByRole (Roles.Identifier).Name;
27
SetChildByRole (Roles.Identifier, new Identifier (value, TextLocation.Empty));
31
public QualifiedType(AstType target, Identifier name)
34
SetChildByRole(Roles.Identifier, name);
37
public AstNodeCollection<AstType> TypeArguments {
38
get { return GetChildrenByRole (Roles.TypeArgument); }
41
public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)
43
return visitor.VisitQualifiedType(this, data);
46
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
48
var o = other as QualifiedType;
49
return o != null && MatchString(this.Name, o.Name) && this.Target.DoMatch(o.Target, match);
52
public override string ToString()
54
StringBuilder b = new StringBuilder();
55
b.Append(this.Target);
58
if (this.TypeArguments.Any()) {
60
b.Append(string.Join(", ", this.TypeArguments));