{"id":56,"date":"2017-04-19T17:47:31","date_gmt":"2017-04-19T09:47:31","guid":{"rendered":"http:\/\/www.myway5.com\/?p=56"},"modified":"2017-04-19T18:12:03","modified_gmt":"2017-04-19T10:12:03","slug":"java-reflect-application","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/","title":{"rendered":"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528"},"content":{"rendered":"<p>java\u4e2d\u7684\u53cd\u5c04\u673a\u5236\uff1a\u53ea\u8981\u7ed9\u5b9a\u7c7b\u7684\u540d\u5b57\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u6709\u7c7b\u7684\u4fe1\u606f\u3002\u56e0\u4e3a\u8fd9\u4e2a\u7c7b\u7684\u540d\u5b57\u662f\u53ef\u4ee5\u5728\u4ee3\u7801\u8fd0\u884c\u65f6\u52a8\u6001\u6307\u5b9a\u7684\uff0c\u6240\u4ee5\u5229\u7528java\u7684\u53cd\u5c04\u673a\u5236\u6bd4\u901a\u8fc7new\u7684\u65b9\u5f0f\u8981\u7075\u6d3b\u7684\u591a<\/p>\n<p>\u5728java\u4e2d\uff0c\u901a\u8fc7new\u7684\u65b9\u5f0f\u521b\u5efa\u7684\u5bf9\u8c61\u79f0\u4e3a\u9759\u6001\u52a0\u8f7d\uff08\u7f16\u8bd1\u65f6\u52a0\u8f7d\u7c7b),\u901a\u8fc7\u53cd\u5c04\u673a\u5236\u521b\u5efa\u5bf9\u8c61\u79f0\u4e3a\u52a8\u6001\u52a0\u8f7d\uff08\u8fd0\u884c\u65f6\u52a0\u8f7d\u7c7b)<\/p>\n<p>java\u53cd\u5c04\u673a\u5236\u7684\u4f7f\u7528\u65b9\u5f0f<\/p>\n<p>\u8fd9\u91cc\u6709\u4e2aHuman\u7c7b\u5982\u4e0b<\/p>\n<p>package com.myway5;<\/p>\n<p>public class Human {<br \/>\n    private String name;<br \/>\n    private int age;<br \/>\n    public String word;<\/p>\n<pre><code>public Human() {\n    \/\/ TODO Auto-generated constructor stub\n}\n\npublic Human(String name) {\n    this.name = name;\n}\n\npublic Human(String name, int age) {\n    this.name = name;\n    this.age = age;\n}\n\npublic String getName() {\n    return name;\n}\n\npublic void setName(String name) {\n    this.name = name;\n}\n\npublic int getAge() {\n    return age;\n}\n\npublic void setAge(int age) {\n    this.age = age;\n}\npublic void speak(String word) {\n     System.out.println(word);\n }\n<\/code><\/pre>\n<p>}<br \/>\n\u6211\u4eec\u4f7f\u7528\u53cd\u5c04\u673a\u5236\u83b7\u53d6Human\u7c7b\u6240\u6709\u7684\u4fe1\u606f<\/p>\n<p>package com.myway5;<\/p>\n<p>import java.lang.reflect.Constructor;<br \/>\nimport java.lang.reflect.Field;<br \/>\nimport java.lang.reflect.Method;<\/p>\n<p>public class Client {<br \/>\n    public static void main(String[] args) {<br \/>\n        \/\/ \u83b7\u53d6\u7c7b\u540d\u7b49\u4fe1\u606f<br \/>\n        Class class1 = Human.class;<br \/>\n        System.out.println(class1.getName());<br \/>\n        System.out.println(class1.getSimpleName());<\/p>\n<pre><code>    System.out.println(\"***********\u6784\u9020\u65b9\u6cd5**********\");\n\n    Constructor[] cs = class1.getDeclaredConstructors();\n    for (Constructor constructor : cs) {\n        System.out.print(constructor.getName() + \"(\");\n        Class[] paramsType = constructor.getParameterTypes();\n        for (Class class2 : paramsType) {\n            System.out.print(class2.getName() + \",\");\n        }\n        System.out.println(\")\");\n    }\n\n    System.out.println(\"**********\u516c\u5171\u6210\u5458\u53d8\u91cf************\");\n    Field[] fields = class1.getFields();\n    for (Field field : fields) {\n        System.out.println(field.getType().getName() + \":\" + field.getName());\n    }\n\n    System.out.println(\"**********\u516c\u5171\u65b9\u6cd5**************\");\n    Method[] methods = class1.getMethods();\n    for (Method method : methods) {\n        System.out.print(method.getName() + \"(\");\n        Class[] params = method.getParameterTypes();\n        for (Class class3 : params) {\n            System.out.print(class3.getName() + \",\");\n        }\n        System.out.println(method.getReturnType().getName() + \")\");\n    }\n\n}\n<\/code><\/pre>\n<p>}<br \/>\n\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a<br \/>\ncom.myway5.Human<br \/>\nHuman<br \/>\n***********\u6784\u9020\u65b9\u6cd5**********<br \/>\ncom.myway5.Human(java.lang.String,int,)<br \/>\ncom.myway5.Human(java.lang.String,)<br \/>\ncom.myway5.Human()<br \/>\n**********\u516c\u5171\u6210\u5458\u53d8\u91cf************<br \/>\njava.lang.String:word<br \/>\n**********\u516c\u5171\u65b9\u6cd5**************<br \/>\ngetName(java.lang.String)<br \/>\nsetName(java.lang.String,void)<br \/>\ngetAge(int)<br \/>\nsetAge(int,void)<br \/>\nwait(long,int,void)<br \/>\nwait(long,void)<br \/>\nwait(void)<br \/>\nequals(java.lang.Object,boolean)<br \/>\ntoString(java.lang.String)<br \/>\nhashCode(int)<br \/>\ngetClass(java.lang.Class)<br \/>\nnotify(void)<br \/>\nnotifyAll(void)<br \/>\n\u53ef\u4ee5\u770b\u5230\uff0c\u6240\u6709\u516c\u5171\u7684\u6210\u5458\u53d8\u91cf\uff0c\u65b9\u6cd5\u90fd\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u65b9\u5f0f\u83b7\u53d6\u5230\uff0c\u90a3\u4e48\u600e\u4e48\u8c03\u7528\u5176\u4e2d\u7684\u65b9\u6cd5\u5462<br \/>\npublic static void useMethod() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException,<br \/>\n            InstantiationException, NoSuchMethodException, SecurityException {<br \/>\n        Class class1 = Human.class;<br \/>\n        Human man = (Human) class1.newInstance();\/\/\u901a\u8fc7newInstance\u521b\u5efa\u5b9e\u4f8b<br \/>\n        Method method = class1.getMethod(&#8220;speak&#8221;, String.class);<br \/>\n        Object object = method.invoke(man, new Object[] { &#8220;hello reflect&#8221; });<br \/>\n    }<\/p>\n<p>android\u5f00\u53d1\u4e2d\u7684\u4f7f\u7528\u540e\u7eed\u66f4\u65b0<\/p>\n<p>\u7ee7\u4e0a\u6587\u66f4\u65b0\uff1a<\/p>\n<p>android\u5f00\u53d1\u4e2d\u5e38\u5e38\u4f1a\u4f7f\u7528java\u7684\u53cd\u5c04\u673a\u5236\u6765\u66f4\u6539\u4e00\u4e9b\u7cfb\u7edf\u5e95\u5c42\u65e0\u6cd5\u66f4\u6539\u7684\u4ee3\u7801\u903b\u8f91\u3002\u6bd4\u5982\u8bf4\u5728AlertDialog\u7684\u4f7f\u7528\u4e2d\uff0c\u901a\u8fc7\u81ea\u5e26\u7684setPositiveButton\u6216\u8005setNegativeButton\u65f6\uff0c\u4e00\u65e6\u70b9\u51fb\u6309\u94ae\u90fd\u4f1a\u9000\u51fadialog\uff0c\u6709\u65f6\u5019\u6211\u4eec\u4e0d\u5e0c\u671b\u4ed6\u9000\u51fa\uff0c\u6bd4\u5982\u7528\u6237\u767b\u5f55\u65f6\u767b\u5f55\u5931\u8d25\u518d\u6b21\u767b\u5f55\u3002\u90a3\u4e48\u4e00\u79cd\u89e3\u51b3\u529e\u6cd5 \u5c31\u662f\u901a\u8fc7java\u7684\u53cd\u5c04\u673a\u5236\u3002<\/p>\n<p>package com.myway5.java_reflect;<\/p>\n<p>import android.app.AlertDialog;<br \/>\nimport android.content.DialogInterface;<br \/>\nimport android.os.Handler;<br \/>\nimport android.os.Message;<br \/>\nimport android.support.v7.app.AppCompatActivity;<br \/>\nimport android.os.Bundle;<\/p>\n<p>import java.lang.ref.WeakReference;<br \/>\nimport java.lang.reflect.Field;<\/p>\n<p>public class MainActivity extends AppCompatActivity{<\/p>\n<pre><code>@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n    AlertDialog.Builder builder=new AlertDialog.Builder(this);\n\n    builder.setMessage(\"Hello Dialog\")\n             .setTitle(\"\u5bf9\u8bdd\u6846\")\n                .setView(getLayoutInflater().inflate(R.layout.dialog_signin,null));\n    builder.setPositiveButton(\"\u786e\u5b9a\", new DialogInterface.OnClickListener() {\n        @Override\n        public void onClick(DialogInterface dialog, int which) {\n\n        }\n    });\n    builder.setNegativeButton(\"\u53d6\u6d88\", new DialogInterface.OnClickListener() {\n        @Override\n        public void onClick(DialogInterface dialog, int which) {\n\n        }\n    });\n    AlertDialog dialog=builder.create();\n    try {\n        Field field = dialog.getClass().getDeclaredField(\"mAlert\");\n        field.setAccessible(true);\n        Object obj=field.get(dialog);\n        field=obj.getClass().getDeclaredField(\"mHandler\");\n        field.setAccessible(true);\n        field.set(obj,new ButtonHandler(dialog));\n    }catch (Exception e){\n        e.printStackTrace();\n    }\n    dialog.show();\n}\nprivate static final class ButtonHandler extends Handler {\n    \/\/ Button clicks have Message.what as the BUTTON{1,2,3} constant\n    private static final int MSG_DISMISS_DIALOG = 1;\n\n    private WeakReference&lt;DialogInterface&gt; mDialog;\n\n    public ButtonHandler(DialogInterface dialog) {\n        mDialog = new WeakReference&lt;DialogInterface&gt;(dialog);\n    }\n\n    @Override\n    public void handleMessage(Message msg) {\n        switch (msg.what) {\n\n            case DialogInterface.BUTTON_POSITIVE:\n            case DialogInterface.BUTTON_NEGATIVE:\n            case DialogInterface.BUTTON_NEUTRAL:\n                ((DialogInterface.OnClickListener) msg.obj).onClick(mDialog.get(), msg.what);\n                break;\n\n            case MSG_DISMISS_DIALOG:\n                \/\/\u8fd9\u91cc\u662f\u70b9\u51fb\u540e\u7684\u903b\u8f91\uff0c\u56e0\u4e3a\u6ce8\u91ca\u6389\u4e86dismiss(),dialog\u4e0d\u4f1a\u9000\u51fa\u4e86\n                \/\/((DialogInterface) msg.obj).dismiss();\n        }\n    }\n}\n<\/code><\/pre>\n<p>}<br \/>\n\u5176\u4e2d<br \/>\ntry {<br \/>\n            Field field = dialog.getClass().getDeclaredField(&#8220;mAlert&#8221;);<br \/>\n            field.setAccessible(true);<br \/>\n            Object obj=field.get(dialog);<br \/>\n            field=obj.getClass().getDeclaredField(&#8220;mHandler&#8221;);<br \/>\n            field.setAccessible(true);<br \/>\n            field.set(obj,new ButtonHandler(dialog));<br \/>\n        }catch (Exception e){<br \/>\n            e.printStackTrace();<br \/>\n        }<br \/>\n\u8fd9\u4e2a\u90e8\u5206\u5c31\u662f\u901a\u8fc7\u53cd\u5c04\u83b7\u53d6AlertDialog\u7684\u79c1\u6709\u53d8\u91cfmAlert,\u7136\u540e\u83b7\u53d6mAlert\u7684\u6210\u5458\u53d8\u91cfmHandler\uff0c\u5c06\u8fd9\u4e2aHandler\u8bbe\u7f6e\u6210\u6211\u4eec\u81ea\u5df1\u7684ButtonHandler\uff0c\u8fd9\u6837\u5c31\u89e3\u51b3\u4e86\u70b9\u51fb\u540e\u9000\u51fa\u7684\u95ee\u9898<\/p>\n<p>\u4ee3\u7801\u5730\u5740\uff1ahttps:\/\/github.com\/joyme123\/java_reflect<\/p>\n<p>\u53c2\u8003\u6587\u7ae0:http:\/\/www.oschina.net\/question\/163910_27112<\/p>\n","protected":false},"excerpt":{"rendered":"<p>java\u4e2d\u7684\u53cd\u5c04\u673a\u5236\uff1a\u53ea\u8981\u7ed9\u5b9a\u7c7b\u7684\u540d\u5b57\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u6709\u7c7b\u7684\u4fe1\u606f\u3002\u56e0\u4e3a\u8fd9\u4e2a\u7c7b\u7684\u540d\u5b57\u662f\u53ef\u4ee5\u5728\u4ee3\u7801\u8fd0\u884c\u65f6\u52a8\u6001\u6307\u5b9a\u7684\uff0c\u6240 &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"java\u4e2d\u7684\u53cd\u5c04\u673a\u5236\uff1a\u53ea\u8981\u7ed9\u5b9a\u7c7b\u7684\u540d\u5b57\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u6709\u7c7b\u7684\u4fe1\u606f\u3002\u56e0\u4e3a\u8fd9\u4e2a\u7c7b\u7684\u540d\u5b57\u662f\u53ef\u4ee5\u5728\u4ee3\u7801\u8fd0\u884c\u65f6\u52a8\u6001\u6307\u5b9a\u7684\uff0c\u6240 &hellip; \u7ee7\u7eed\u9605\u8bfbjava\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-19T09:47:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-19T10:12:03+00:00\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528\",\"datePublished\":\"2017-04-19T09:47:31+00:00\",\"dateModified\":\"2017-04-19T10:12:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\"},\"wordCount\":274,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"articleSection\":[\"java\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\",\"name\":\"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"datePublished\":\"2017-04-19T09:47:31+00:00\",\"dateModified\":\"2017-04-19T10:12:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/","og_locale":"zh_CN","og_type":"article","og_title":"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"java\u4e2d\u7684\u53cd\u5c04\u673a\u5236\uff1a\u53ea\u8981\u7ed9\u5b9a\u7c7b\u7684\u540d\u5b57\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u6709\u7c7b\u7684\u4fe1\u606f\u3002\u56e0\u4e3a\u8fd9\u4e2a\u7c7b\u7684\u540d\u5b57\u662f\u53ef\u4ee5\u5728\u4ee3\u7801\u8fd0\u884c\u65f6\u52a8\u6001\u6307\u5b9a\u7684\uff0c\u6240 &hellip; \u7ee7\u7eed\u9605\u8bfbjava\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528","og_url":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2017-04-19T09:47:31+00:00","article_modified_time":"2017-04-19T10:12:03+00:00","author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528","datePublished":"2017-04-19T09:47:31+00:00","dateModified":"2017-04-19T10:12:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/"},"wordCount":274,"commentCount":0,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"articleSection":["java"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/","url":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/","name":"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"datePublished":"2017-04-19T09:47:31+00:00","dateModified":"2017-04-19T10:12:03+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2017\/04\/19\/java-reflect-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"java\u53cd\u5c04\u673a\u5236\u4ee5\u53ca\u5728android\u5f00\u53d1\u4e2d\u7684\u5e94\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":4326,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":1,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/56\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}