Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to get actual type in generic?

qiaoMay 4 2014 — edited May 4 2014

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2014
Added on May 4 2014
0 comments
921 views