在看關(guān)于反射的內(nèi)容 但是看API里面 ?Type的描述只有 ? ?Type 是 Java 編程語言中所有類型的公共高級接口。它們包括原始類型、參數(shù)化類型、數(shù)組類型、類型變量和基本類型。并沒有任何的一個(gè)方法 ?是空的嗎? ?但是有好幾個(gè)子接口?剛在eclipse找個(gè)顯示的源碼了 ?但是更加糊涂了 ?接口不是不能有實(shí)例方法嗎 ?他這個(gè)接口里面的有方法 還有返回值?。ublic interface Type {? ? /**? ? ?* Returns a string describing this type, including information? ? ?* about any type parameters.? ? ?*? ? ?* @implSpec The default implementation calls {@code toString}.? ? ?*? ? ?* @return a string describing this type? ? ?* @since 1.8? ? ?*/? ? default String getTypeName() {? ? ? ? return toString(); ? // ? 為什么接口里面 還有返回值啊 ?和我看的東西沖突啊? ? }}
添加回答
舉報(bào)
0/150
提交
取消