Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How are implicit casts handled in JDT?
How are implicit casts handled in JDT? [message #249565] Wed, 14 November 2007 00:20 Go to next message
Eclipse UserFriend
Hi folks,

"How are implicit casts handled in JDT?"
Any description? Any document which describes this?

Regards,
Rahul Mishra
Re: How are implicit casts handled in JDT? [message #249580 is a reply to message #249565] Wed, 14 November 2007 11:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Rahul Mishra" <rahulk.mishra@tcs.com> wrote in message
news:8a07854507f40e8bf4c9f409d21e4bba$1@www.eclipse.org...
> Hi folks,
>
> "How are implicit casts handled in JDT?" Any description? Any document
> which describes this?


Implicit casts are handled according to the Java Language Specification, as
published by Sun.

If that's not the answer you were looking for, can you be more specific in
your question? What exactly do you mean by "handled in JDT"?
Re: How are implicit casts handled in JDT? [message #249589 is a reply to message #249580] Thu, 15 November 2007 00:35 Go to previous messageGo to next message
Eclipse UserFriend
>>Hi folks,
>>
>> "How are implicit casts handled in JDT?" Any description? Any document
>>which describes this?
>
>Implicit casts are handled according to the Java Language Specification, as
>published by Sun.

>If that's not the answer you were looking for, can you be more specific in
>your question? What exactly do you mean by "handled in JDT"?

To be more specific, Are there any specific files/classes/routines in JDT
that take care of the implicit casts? For example,
byte b = 10;
int i = b; /* implicit cast from byte to int */

In the second statement an implicit cast is being done. So, my query is:
which files/classes/routines make this conversion from byte to int?
Re: How are implicit casts handled in JDT? [message #249893 is a reply to message #249589] Fri, 30 November 2007 07:00 Go to previous messageGo to next message
Eclipse UserFriend
Rahul Mishra wrote:
>>> Hi folks,
>>>
>>> "How are implicit casts handled in JDT?" Any description? Any
>>> document which describes this?
>>
>> Implicit casts are handled according to the Java Language
>> Specification, as published by Sun.
>
>> If that's not the answer you were looking for, can you be more
>> specific in your question? What exactly do you mean by "handled in JDT"?
>
> To be more specific, Are there any specific files/classes/routines in
> JDT that take care of the implicit casts? For example,
> byte b = 10;
> int i = b; /* implicit cast from byte to int */
>
> In the second statement an implicit cast is being done. So, my query
> is: which files/classes/routines make this conversion from byte to int?

Have a look at compiler internals:

org.eclipse.jdt.internal.compiler.ast.Expression#computeConv ersion(Scope,
TypeBinding, TypeBinding)

(method is overriden in various places)
Re: How are implicit casts handled in JDT? [message #249896 is a reply to message #249893] Fri, 30 November 2007 08:42 Go to previous message
Eclipse UserFriend
Indeed, I had come across it. But isnt these conversions done in the
org.eclipse.jdt.dom?

Regards,
Rahul Mishra
Previous Topic:Is there way not to compile erroneous *.java files
Next Topic:Attaching comments to programatically generated AST
Goto Forum:
  


Current Time: Thu Jul 17 19:59:49 EDT 2025

Powered by FUDForum. Page generated in 0.47380 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top