浏览代码

annoValMatch: testcode

tags/V1_6_0M2
aclement 16 年前
父节点
当前提交
aff8542d4f
共有 3 个文件被更改,包括 53 次插入0 次删除
  1. 19
    0
      weaver5/java5-testsrc/test/A3.java
  2. 20
    0
      weaver5/java5-testsrc/test/AnnoValues.java
  3. 14
    0
      weaver5/java5-testsrc/test/Color.java

+ 19
- 0
weaver5/java5-testsrc/test/A3.java 查看文件

@@ -0,0 +1,19 @@
/* *******************************************************************
* Copyright (c) 2008 Contributors
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors
* Andy Clement
* ******************************************************************/
package test;

import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
public @interface A3 {
Color value() default Color.RED;
}

+ 20
- 0
weaver5/java5-testsrc/test/AnnoValues.java 查看文件

@@ -0,0 +1,20 @@
/* *******************************************************************
* Copyright (c) 2008 Contributors
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors
* Andy Clement
* ******************************************************************/
package test;

public class AnnoValues {
public void none() {}
@A3 public void defaultMethod() {}
@A3(Color.GREEN) public void greenMethod() {}
@A3(Color.RED) public void redMethod() {}
@A3(Color.BLUE) public void blueMethod() {}
}

+ 14
- 0
weaver5/java5-testsrc/test/Color.java 查看文件

@@ -0,0 +1,14 @@
package test;
/* *******************************************************************
* Copyright (c) 2008 Contributors
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors
* Andy Clement
* ******************************************************************/

public enum Color { RED, GREEN, BLUE }

正在加载...
取消
保存