- get generic type from list class
https://stackoverflow.com/questions/1942644/get-generic-type-of-java-util-list
Get generic type of java.util.List
I have; List<String> stringList = new ArrayList<String>(); List<Integer> integerList = new ArrayList<Integer>(); Is there a (easy) way to retrieve the generic type of the ...
stackoverflow.com
- get generic type from array class
Class<?> arrayCls = String[].class;
if(arrayCls.isArray()){
Class<?> cls = arrayCls.getComponentType();
}
https://stackoverflow.com/questions/13392160/about-java-get-string-class-from-string-class-what-if-string-class-is
about java: get `String[].class` from `String.class`, what if `String.class` is a "runtime type"?
Here is a variable Class<?> cls, now I want to get another Array Class Object which component type is cls. For example, if cls=String.class , I want to get String[].class; if cls=int.clas...
stackoverflow.com
'java' 카테고리의 다른 글
remove null value or empty value (0) | 2023.10.31 |
---|---|
change annotation value at runtime (0) | 2023.10.24 |
get all classes-classLoader (0) | 2023.10.13 |
정규표현식 (0) | 2023.08.18 |
정규식 이용한 마스킹 처리 (0) | 2023.08.18 |