mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 17:58:43 +02:00
31 lines
625 B
Java
31 lines
625 B
Java
![]() |
import org.aspectj.testing.Tester;
|
||
|
import java.io.*;
|
||
|
|
||
|
// PR#96
|
||
|
|
||
|
interface HttpConstants {
|
||
|
static final String s = "s";
|
||
|
}
|
||
|
|
||
|
public aspect FieldFromImplementsNotFound implements HttpConstants {
|
||
|
public static void main(String[] args) { test(); }
|
||
|
|
||
|
pointcut sendHeader():
|
||
|
call(void LocalFile.sendHeader());
|
||
|
|
||
|
static String aspectField = "t";
|
||
|
/*static*/ before(): sendHeader() {
|
||
|
aspectField += s;
|
||
|
}
|
||
|
|
||
|
public static void test() {
|
||
|
new LocalFile().sendHeader();
|
||
|
Tester.checkEqual(aspectField, "ts", "field + constant");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class LocalFile {
|
||
|
void sendHeader() {
|
||
|
}
|
||
|
}
|