<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ``` Person person = new Person("張三", 11); Class c = person.getClass(); //1. 獲取類的名稱 //System.out.println(c.getName()); //Object.Person ``` #### 構造方法 ``` //對象的構造函數信息 // getConstructors 獲取所有public構造函數 // getDeclaredConstructors 獲取所有構造函數 Constructor[] declaredConstructors = c.getDeclaredConstructors(); for (Constructor constructor : declaredConstructors){ System.out.println(constructor.getName()); //構造函數的參數列表,參數類型 Class[] parameterTypes = constructor.getParameterTypes(); for (Class c1 : parameterTypes){ System.out.println(c1.getName()); } } ``` #### 對象方法 ``` //2. 獲取所有的public的方法,包括從父類繼承的 Method[] methods = c.getMethods(); Method[] declaredMethods = c.getDeclaredMethods(); //自己聲明的方法 for(Method method : methods){ //返回值類型 Class returnType = method.getReturnType(); //方法名稱 method.getName(); //方法參數類型 method.getParameterTypes(); } ``` #### 對象的成員變量 ``` // 對象的成員變量信息 Field[] declaredFields = c.getDeclaredFields(); for (Field field : declaredFields){ Class fieldType = field.getType(); String typeName = fieldType.getName(); String fieldName = field.getName(); System.out.println(fieldType + " " + typeName + " "+ fieldName); } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看