I have next code:
class iCache<K,V> implements Map<Object, Object>
{
...//Code
}
How can I get the class name of K and V?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you extend
iCacheand want to obtain the typer parameters you used to declare the subclass (like below):You can find out those parameters at runtime using the following (source):
If you provide the parameters at instantiating like this
then you are out of luck (more info).