{"id":160,"date":"2017-01-17T16:00:00","date_gmt":"2017-01-17T07:00:00","guid":{"rendered":"https:\/\/java-code.jp\/?p=160"},"modified":"2020-03-03T12:46:03","modified_gmt":"2020-03-03T03:46:03","slug":"interface%e5%91%bd%e4%bb%a4-2","status":"publish","type":"post","link":"https:\/\/java-code.jp\/160","title":{"rendered":"@interface\u547d\u4ee4"},"content":{"rendered":"<p><em class=\"ccenterContents01\">\u72ec\u81ea\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b &#8211; @interface\u547d\u4ee4<\/em><\/p>\n<dl class=\"comand_frame\">\n<dt class=\"comand_txt\">@intarface name {<\/dt>\n<dt class=\"comand_txt ml20\">  definiton<\/dt>\n<dt class=\"comand_txt\">}<\/dt>\n<dd class=\"comand_exp\">name\uff1a\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u540d<\/dd>\n<dd class=\"comand_exp\">definition\uff1a\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u5b9a\u7fa9<\/dd>\n<\/dl>\n<p>@interface\u547d\u4ee4\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u81ea\u5206\u3067\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u4ee5\u4e0b\u306f\u3001Version\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u4f8b\u3067\u3059\u3002<\/p>\n<div class=\"pre\">\n<pre class=\"brush:java;\">\r\n@Retention(RetentionPolicy.RUNTIME)\r\n@Target(ElementType.METHOD)\r\n@Inherited\r\npublic @interface Version {\r\n  double value();\r\n}\r\n<\/pre>\n<p><!-- \/ .pre --><\/div>\n<p>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u5b9a\u7fa9\u3067\u306f\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u305d\u306e\u3082\u306e\u306e\u60c5\u5831\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\uff08<span>\u30e1\u30bf\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3<\/span>\uff09\u3092\u4ed8\u4e0e\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u5229\u7528\u3067\u304d\u308b\u4e3b\u306a\u30e1\u30bf\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n<table>\n<tr>\n<th colspan=\"2\" class=\"tableTitle\">\u4e3b\u306a\u30e1\u30bf\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3<\/th>\n<\/tr>\n<tr>\n<th>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3<\/th>\n<th>\u6982\u8981<\/th>\n<\/tr>\n<tr>\n<td>@Target<\/td>\n<td>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3067\u304d\u308b\u5bfe\u8c61\uff08TYPE\u3001METHOD\u3001FIELD\u3001PARAMETER\u306a\u3069\uff09<\/td>\n<\/tr>\n<tr>\n<td>@Rentention<\/td>\n<td>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u60c5\u5831\u304c\u7dad\u6301\u3055\u308c\u308b\u7bc4\u56f2\uff08SOURCE\u3001CLASS\u3001RUNTIME\uff09<\/td>\n<\/tr>\n<tr>\n<td>@Inherited<\/td>\n<td>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u60c5\u5831\u304c\u30b5\u30d6\u30af\u30e9\u30b9\u306b\u3082\u7d99\u627f\u3055\u308c\u308b\u304b<\/td>\n<\/tr>\n<\/table>\n<p>@interface\u547d\u4ee4\u306e\u914d\u4e0b\u306b\u306f\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u5229\u7528\u3067\u304d\u308b\u5c5e\u6027\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5c5e\u6027\u306f\u3001\u62bd\u8c61\u30e1\u30bd\u30c3\u30c9\u3068\u540c\u3058\u304f\u3001\u578b\u3068\u540d\u524d\u306e\u30bb\u30c3\u30c8\u3067\u8868\u3057\u307e\u3059\u3002<br \/>\n  \u3053\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u5c5e\u6027\u306f\u3001\u4e00\u822c\u7684\u306b\u300c@\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u540d(\u5c5e\u6027\u540d=\u5024,&#8230;)\u300d\u306e\u5f62\u5f0f\u3067\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5c5e\u6027\u540d\u304cvalue\u306e\u3068\u304d\u306f\u540d\u524d\u3092\u7701\u7565\u3057\u3066\u300c@\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u540d(\u5024)\u300d\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<br \/>\n  \u305f\u3068\u3048\u3070\u3001\u4ee5\u4e0b\u306fVersion\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u305fannotationTest\u30e1\u30bd\u30c3\u30c9\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<p class=\"list\">AnnotationSample.java<\/p>\n<div class=\"pre\">\n<pre class=\"brush:java;\">\r\npackage com.example.mynavi.object;\r\n\r\npublic class AnnotationSample {\r\n  @Version(1.0)\r\n  public void annotationTest() {\r\n    System.out.println(\"Released\");\r\n  }\r\n}\r\n<\/pre>\n<p><!-- \/ .pre --><\/div>\n<style>\n.ml20 {\n  margin-left: 20px;\n}\n<\/style>\n","protected":false},"excerpt":{"rendered":"<p>\u72ec\u81ea\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b &#8211; @interface\u547d\u4ee4 @intarface name { definiton } name\uff1a\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u540d definition\uff1a\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u5b9a\u7fa9 @interf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-160","post","type-post","status-publish","format-standard","hentry","category-annotation"],"_links":{"self":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts\/160"}],"collection":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/comments?post=160"}],"version-history":[{"count":7,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts\/160\/revisions"}],"predecessor-version":[{"id":1494,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts\/160\/revisions\/1494"}],"wp:attachment":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/media?parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/categories?post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/tags?post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}