3
그럼 Java로 어떻게하면됩니까?Generics 정의 된 엔티티의 .class를 얻는 방법?
는List<String> strings = new ArrayList<String>();
JAXBElement<List<String>> jax = new JAXBElement<List<String>>(new QName("strings"), List<String>.class, strings);
문제는 특히 List.class에서 발생하고 반환 된 오류는 다음과 같습니다
Multiple markers at this line
- List cannot be resolved to a variable
- String cannot be resolved to a variable
- Syntax error on token ">", void expected after this token
"효율성을 위해 의도적으로 완료되었습니다."출처? 지우는 주된 이유는 이전 버전과의 호환성 때문이었습니다. –
많은 것으로 나타났습니다. 감사. – Salsero69
올가미 (Ola Bini)가 JVM에서 제네릭을 일으킬 수있는 문제에 대한 멋진 블로그 게시물은 다음과 같습니다. http://olabini.com/blog/2010/07/questioning-the-reality-of-generics/ – jjathman