01: /*******************************************************************************
02: * Copyright (c) 2005 BEA Systems, Inc.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * sbandow@bea.com - initial API and implementation
10: *
11: *******************************************************************************/package org.eclipse.jdt.apt.tests.annotations.mirrortest;
12:
13: @SuppressWarnings("nls")
14: public class MirrorDeclarationCodeExample {
15: public static final String CODE_PACKAGE = "mirrortestpackage";
16: public static final String CODE_CLASS_NAME = "DeclarationTestClass";
17: public static final String CODE_FULL_NAME = CODE_PACKAGE + "."
18: + CODE_CLASS_NAME;
19:
20: public static final String CODE = "package mirrortestpackage;\n"
21: + "import org.eclipse.jdt.apt.tests.annotations.mirrortest.MirrorDeclarationTestAnnotation;"
22: + "\n"
23: + "@MirrorDeclarationTestAnnotation(s=\"fred\", value=5)"
24: + "\n"
25: + "public class DeclarationTestClass {"
26: + "\n"
27: + " public class ClassDec {"
28: + "\n"
29: + " public ClassDec() {}"
30: + "\n"
31: + " public ClassDec(int j) {}"
32: + "\n"
33: + " public static final int i = 1;"
34: + "\n"
35: + " public float f;"
36: + "\n"
37: + " public static final String s = \"hello\";"
38: + "\n"
39: + " public java.util.GregorianCalendar gc;"
40: + "\n"
41: + " public void methodDec(int k, String... t) throws Exception {}"
42: + "\n"
43: + " public void methodDecNoArg(){}"
44: + "\n"
45: + " @MirrorDeclarationTestAnnotation() public Object foo(Object o) throws Exception {\n"
46: + " return null;\n"
47: + " }\n"
48: + " @MirrorDeclarationTestAnnotation() public Object foo2(Object o) throws Exception {\n"
49: + " return null;\n"
50: + " }\n"
51: + " @MirrorDeclarationTestAnnotation() public Object foo3(Object o) throws Exception {\n"
52: + " return null;\n" + " }\n" + " }" + "\n"
53: + " public enum EnumDec {" + "\n" + " aardvark, anteater"
54: + "\n" + " }" + "\n" + "}";
55: }
|