Forum Stats

  • 3,750,550 Users
  • 2,250,192 Discussions
  • 7,867,004 Comments

Discussions

how to get actual type in generic?

qiao
qiao Member Posts: 2
edited May 4, 2014 10:50AM in Generics

hi,guys,

i have a problem,how to get actual type when i use generic.

Some code like this:

public class BaseResponse<D extends Serializable> implements Serializable {
}

there is a method like this:

public BaseResponse<SubmitResponse> submit();

so,is it possible to get "SubmitResponse" when i use reflection to analyse the method "submit"?


any help will be appreciated.

bmitResponse

This discussion has been closed.