1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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
20 public enum PointCutFlags
30 /// Summary description for PointCutDefinition.
33 public class PointCutDefinition
: NodeBase
35 private MethodSignature _targetMethod
= AllMethodSignature
.Instance
;
36 private InterceptorDefinitionCollection _advices
= new InterceptorDefinitionCollection();
37 private PointCutFlags _flags
;
39 public PointCutDefinition(LexicalInfo info
, PointCutFlags flags
) : base(info
)
44 public MethodSignature Method
46 get { return _targetMethod; }
47 set { _targetMethod = value; }
50 public PointCutFlags Flags
52 get { return _flags; }
55 public InterceptorDefinitionCollection Advices
57 get { return _advices; }
60 public override bool Equals(object other
)
62 PointCutDefinition otherCut
= other
as PointCutDefinition
;
69 if (otherCut
.Flags
.Equals( Flags
) &&
70 otherCut
.Method
.Equals( Method
))
78 public override int GetHashCode()
81 return ((int) _flags
) ^ Method
.GetHashCode();
84 public override void Accept(IVisitor visitor
)
86 visitor
.OnPointCutDefinition(this);