getIntent() and subclass of Intent
<p>I wrote a class MyIntent which extends Intent.
and then i use an instance of MyIntent to invoke startActivity(MyIntent).</p>

<pre><code>MyIntent i=new MyIntent(this,NewActivity.class);
</code></pre>

<p>the  constructor is:</p>

<pre><code>public MyIntent(Context context,Class&lt;?&gt; cls){
super(context,cls);
putExtra(var1,var2);
//other codes
((Activity)context).startActivity(this);
}
</code></pre>

<p>however,when i call getIntent() in the new started activity the returned value of getIntent() is an Intent not MyIntent，that is</p>

<pre><code>getIntent() instanceof Intent // true;
getIntent() instanceof MyIntent // false;
</code></pre>

<p>when i try (MyIntent)getIntent() the system throws me ClassCastException.How so? </p>
