ActivityInstrumentationTestCase2 is parameterized by the Activity under test, as illustrated in the tutorial:
http://developer.android.com/resources/tutorials/testing/helloandroid_test.html Without parameterization, this base class would not be able to provide a getActivity method that returned the activity under test: http://developer.android.com/reference/android/test/ActivityInstrumentationTestCase2.html The use of <T extends ...> bounded type is explained in the Java tutorial: http://java.sun.com/docs/books/tutorial/java/generics/bounded.html Also check out the PECS rule for bounded wildcard types. In Effective Java, 2nd Ed. Joe On Jun 8, 9:02 pm, Raja Nagendra Kumar <nagendra.r...@tejasoft.com> wrote: > Hi, > > I see in android some special syntax (may be I am unaware of usage of > generics this way) > such as > > public static abstract class ActivityInstrumentationTestCase2<T > extends android.app.Activity> extends android.test.ActivityTestCase > > I am unable to know the exact meaning of > ActivityInstrumentationTestCase2<T extends android.app.Activity> > > i.e the need and its implications of <T extends android.app.Activity> > > Could any one help what this means and where else to hunt for Java > Generics support related to such kind of class declaration > > Regards, > Nagendra -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en