Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30601

Re: Class<T> get generic type at runtime CDI

From Sebastian <news@seyweiler.dyndns.org>
Newsgroups comp.lang.java.programmer
Subject Re: Class<T> get generic type at runtime CDI
Date 2014-12-20 15:20 +0100
Organization albasani.net
Message-ID <m740j3$55o$1@news.albasani.net> (permalink)
References <be034564-30a4-4be6-82fa-2dc7717b70c9@googlegroups.com> <cfir38Fg52fU1@mid.individual.net> <fb6aebf7-3cc3-4957-9283-3bd96cf0848a@googlegroups.com>

Show all headers | View raw


Am 19.12.2014 16:13, schrieb Leonan Luppi:
> Em sexta-feira, 19 de dezembro de 2014 12h30min14s UTC-2, Robert Klemme  escreveu:
>> On 19.12.2014 13:23, Leonan Luppi wrote:
>>> Hello,
>>>
>>> I'm try to get generic class type but isn't work. Someone can help
>>> me?  I'm using CDI Weld to Inject my DAO class with a generic type:
>>>
[snip]
>>
>> Judging from the code you presented you need at least to return a
>> collection of T (e.g. Iterable<T>) and not a T.
>>
>> Cheers
>>
>> 	robert
>>
[snip]

Hava a look at https://github.com/jhalterman/typetools
I believe this library will solve your problem.

-- Sebastian

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Class<T> get generic type at runtime CDI Leonan Luppi <leonan.luppi@gmail.com> - 2014-12-19 04:23 -0800
  Re: Class<T> get generic type at runtime CDI Robert Klemme <shortcutter@googlemail.com> - 2014-12-19 15:29 +0100
    Re: Class<T> get generic type at runtime CDI Leonan Luppi <leonan.luppi@gmail.com> - 2014-12-19 07:13 -0800
      Re: Class<T> get generic type at runtime CDI Sebastian <news@seyweiler.dyndns.org> - 2014-12-20 15:20 +0100
  Re: Class<T> get generic type at runtime CDI Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-12-20 18:28 +0000

csiph-web