blob: 64c6778fce4fde72d7f31be52dc533bc9e6c3b6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
/* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.weaver;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.weaver.ast.Var;
public class TestShadow extends Shadow {
private final World world;
private final UnresolvedType thisType;
public TestShadow(Kind kind, Member signature, UnresolvedType thisType, World world) {
super(kind, signature, null);
this.world = world;
this.thisType = thisType;
}
public World getIWorld() {
return world;
}
/** this is subtly wrong. ha ha */
public UnresolvedType getEnclosingType() {
return thisType;
}
public Var getThisVar() {
// we should thorw if we don't have a this
return new Var(getThisType().resolve(world));
}
public Var getTargetVar() {
if (!hasTarget())
throw new RuntimeException("bad");
return new Var(getTargetType().resolve(world));
}
public Var getArgVar(int i) {
return new Var(getArgType(i).resolve(world));
}
public Var getThisEnclosingJoinPointStaticPartVar() {
throw new RuntimeException("unimplemented");
}
public Var getThisAspectInstanceVar(ResolvedType aspectType) {
throw new RuntimeException("unimplemented");
}
public Var getThisJoinPointStaticPartVar() {
throw new RuntimeException("unimplemented");
}
public Var getThisJoinPointVar() {
throw new RuntimeException("unimplemented");
}
public ISourceLocation getSourceLocation() {
throw new RuntimeException("unimplemented");
}
public Member getEnclosingCodeSignature() {
throw new RuntimeException("unimplemented");
}
/*
* (non-Javadoc)
*
* @see org.aspectj.weaver.Shadow#getKindedAnnotationVar()
*/
public Var getKindedAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/*
* (non-Javadoc)
*
* @see org.aspectj.weaver.Shadow#getWithinAnnotationVar()
*/
public Var getWithinAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/*
* (non-Javadoc)
*
* @see org.aspectj.weaver.Shadow#getWithinCodeAnnotationVar()
*/
public Var getWithinCodeAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/*
* (non-Javadoc)
*
* @see org.aspectj.weaver.Shadow#getThisAnnotationVar()
*/
public Var getThisAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/*
* (non-Javadoc)
*
* @see org.aspectj.weaver.Shadow#getTargetAnnotationVar()
*/
public Var getTargetAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/*
* (non-Javadoc)
*
* @see org.aspectj.weaver.Shadow#getArgAnnotationVar(int)
*/
public Var getArgAnnotationVar(int i, UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
}
|