Created
February 21, 2016 17:48
-
-
Save ip-imamoto/f4407d1ca4a5ff9c45f8 to your computer and use it in GitHub Desktop.
アノテーションの定義方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package myannotation; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface MyAnnotation { | |
String value() default "デフォルト値だよー!!"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment