Added container accessor to Castle.Core
[castle.git] / AspectSharp / AspectSharp.Lang / AST / AspectDefinition.cs
blob74f93369a20b4ccb0454a04e412ac080a17b5be2
1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace AspectSharp.Lang.AST
17 using System;
19 /// <summary>
20 /// Summary description for AspectDefinition.
21 /// </summary>
22 [Serializable]
23 public class AspectDefinition : NodeBase
25 private String _name;
26 private TargetTypeDefinition _targetType;
27 private PointCutDefinitionCollection _pointcuts = new PointCutDefinitionCollection();
28 private MixinDefinitionCollection _mixins = new MixinDefinitionCollection();
30 public AspectDefinition(LexicalInfo info, String name) : base(info)
32 Name = name;
35 public String Name
37 get { return _name; }
38 set { _name = value; }
41 public TargetTypeDefinition TargetType
43 get { return _targetType; }
44 set { _targetType = value; }
47 public PointCutDefinitionCollection PointCuts
49 get { return _pointcuts; }
52 public MixinDefinitionCollection Mixins
54 get { return _mixins; }
57 public override void Accept(IVisitor visitor)
59 visitor.OnAspectDefinition(this);
62 public override string ToString()
64 return Name;
67 public override bool Equals(object obj)
69 return _name.Equals(obj);
72 public override int GetHashCode()
74 return _name.GetHashCode();