Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6408
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | markspace <-@.> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Problem with generics and dynamic array copy |
| Date | Fri, 22 Jul 2011 11:23:31 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 16 |
| Message-ID | <j0cf75$8pm$1@dont-email.me> (permalink) |
| References | <j0cbru$289$1@news.albasani.net> <j0cc2t$289$2@news.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-15; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 22 Jul 2011 18:23:33 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="9014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7Qv0QkivJGmhzWX8NySrxGVDBmyYxt9M=" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 |
| In-Reply-To | <j0cc2t$289$2@news.albasani.net> |
| Cancel-Lock | sha1:Tjw5lR+SiN8NVznbur930tjLCx0= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6408 |
Show key headers only | View raw
On 7/22/2011 10:30 AM, Sebastian wrote:
>> public static final <T> T[] arraycopy( T[] src )
>> {
>> Class<T> componentType = src.getClass().getComponentType(); // !!!!
RTFM. getComponentType() returns Class<?>, not Class<T>.
<http://download.oracle.com/javase/6/docs/api/java/lang/Class.html#getComponentType%28%29>
public Class<?> getComponentType()
Returns the Class representing the component type of an array. If
this class does not represent an array class this method returns null.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Problem with generics and dynamic array copy Sebastian <sebastian@undisclosed.invalid> - 2011-07-22 19:26 +0200
Re: Problem with generics and dynamic array copy Sebastian <sebastian@undisclosed.invalid> - 2011-07-22 19:30 +0200
Re: Problem with generics and dynamic array copy markspace <-@.> - 2011-07-22 11:23 -0700
Re: Problem with generics and dynamic array copy Sebastian <sebastian@undisclosed.invalid> - 2011-07-22 20:36 +0200
Re: Problem with generics and dynamic array copy Robert Klemme <shortcutter@googlemail.com> - 2011-07-22 21:27 +0200
Re: Problem with generics and dynamic array copy lewbloch <lewbloch@gmail.com> - 2011-07-22 13:33 -0700
Re: Problem with generics and dynamic array copy Sebastian <sebastian@undisclosed.invalid> - 2011-07-22 22:37 +0200
Re: Problem with generics and dynamic array copy lewbloch <lewbloch@gmail.com> - 2011-07-22 15:49 -0700
csiph-web