Java ????????
???????????? ???????[ 2015/9/23 10:45:29 ] ??????????????????? ???????
??????????????????梅???
????????????????????????????锌??????????????????star?????????????????issue????????懈????????????pull request??????????????????????jOOR?斜?写????????????????????????????
???????????
???????“??”???????????????“??????榉�????????????”
??????????浠�???????????????霉???????????????????
??????????写??????????写??
????public static <T> T create(HttpRequest httpRequest) {
????Object httpRequestEntity = null;
????try {
????Class<T> httpRequestEntityCls = (Class<T>) Class.forName(HttpProcessor.PACKAGE_NAME + "." + HttpProcessor.CLASS_NAME);
????Constructor con = httpRequestEntityCls.getConstructor(HttpRequest.class);
????httpRequestEntity = con.newInstance(httpRequest);
????} catch (ClassNotFoundException e) {
????e.printStackTrace();
????} catch (InstantiationException e) {
????e.printStackTrace();
????} catch (IllegalAccessException e) {
????e.printStackTrace();
????} catch (NoSuchMethodException e) {
????e.printStackTrace();
????} catch (InvocationTargetException e) {
????e.printStackTrace();
????}
????return (T) httpRequestEntity;
????}
?????????????????泻??????????????????????????????????写?些??????????????????????api????????????????api????????椋�???????????????锟�???????????????????写????????????????????????写?????????????????
????String str = new String();
??????????????写????????
?????????泻??????????????????????????????????梅?????????????梅?????????梅???????????????????????????????????????梅?????????????????????
????????????
??????????????????????????????????????????????????
??????????????????“?????????api???????????????????榘�???????榉�??写??????????????????????????????????”
???????????????写?榉�????????????????????????????????????????????写?????????械?findViewById?????????????xml??????????????????
??????????????????????????????????????????????????????????????写?????????写????????????
??????????????????????????梅?????????
????1. ???涔�????????????????
????2. set??get???????????????
????3. ???貌??????????
???????????????
????3.1 ??写???写????
??????????Android?????????????TextView????????伞??????????????????
????TextView mTv;
??????????????????
????// ??????????????
????mTv = Reflect.on(TextView.class).create(this).get();
????// ?????????????
????String word = Reflect.on("java.lang.String").create("Reflect TextView").get();
????// ?????????????
????Fragment fragment = Reflect.on(Fragment.class).create().get();
?????????????梅?????
????// ?????????????
????L.d("call getText() : " + Reflect.on(mTv).call("getText").toString());
????// ?????胁???????
????Reflect.on(mTv).call("setTextColor"?? 0xffff0000);
???????????get??set?????
????TextView???懈?mText??????????????????????????
????// ???貌???
????Reflect.on(mTv).set("mText"?? "---------- new Reflect TextView ----------");
????// ??貌???
????L.d("setgetParam is " + Reflect.on(mTv).get("mText"));
??????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11