For example:
I have a class foo[A] {...}
, and I created an object with foo [Int], and after that I want to get the data type in A in the body of its code for some processing.
When I refer to 'A' by using A.isInstanceOf[...]
in the body of the class, it says value A is not found.
Is there any way to extract a specific data type of a type parameter that is passed after an object's instantiation in Scala and/or Java?