ClassInterfaceAttribute.Annotation?

View: New views
3 Messages — Rating Filter:   Alert me  

ClassInterfaceAttribute.Annotation?

by Valeriy Pikulskyy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeroen,
When I do "ikvmstub mscorlib", I have in the resulted mscorlib.jar
classes: ClassInterfaceAttribute, ClassInterfaceType, but there is no
ClassInterfaceAttribute.Annotation. How to fix this? My goal is to
compile the following code (IKVM-0.40.0.30):

-- begin of test.java

import cli.System.Runtime.InteropServices.ClassInterfaceAttribute;
import cli.System.Runtime.InteropServices.ClassInterfaceType;
import cli.System.Runtime.InteropServices.ComVisibleAttribute;

@ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)

@ComVisibleAttribute.Annotation(true)
interface assembly {}

--- end of test.java

Thank you.
Valeriy.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: ClassInterfaceAttribute.Annotation?

by Jeroen Frijters :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Valeriy,

Some custom attributes aren't easily mapped onto Java annotations and ClassInterfaceAttribute is one of them (because it has two constructors that both take an argument and no default constructor).

One possible way to "solve" this is would be to add a list of special case custom attributes (mscorlib has a couple more of these) and specify which of the two constructors to ignore. It's a bit ugly, but it may be the best option.

I'll consider this for 0.42.

Regards,
Jeroen

> -----Original Message-----
> From: Valeriy Pikulskyy [mailto:pikulsky@...]
> Sent: Friday, September 18, 2009 4:55 PM
> To: ikvm-developers@...
> Subject: [Ikvm-developers] ClassInterfaceAttribute.Annotation?
>
> Hi Jeroen,
> When I do "ikvmstub mscorlib", I have in the resulted mscorlib.jar
> classes: ClassInterfaceAttribute, ClassInterfaceType, but there is no
> ClassInterfaceAttribute.Annotation. How to fix this? My goal is to
> compile the following code (IKVM-0.40.0.30):
>
> -- begin of test.java
>
> import cli.System.Runtime.InteropServices.ClassInterfaceAttribute;
> import cli.System.Runtime.InteropServices.ClassInterfaceType;
> import cli.System.Runtime.InteropServices.ComVisibleAttribute;
>
> @ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)
>
> @ComVisibleAttribute.Annotation(true)
> interface assembly {}
>
> --- end of test.java
>
> Thank you.
> Valeriy.
>
> -----------------------------------------------------------------------
> -------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your developing skills, take BlackBerry mobile applications to market
> and stay ahead of the curve. Join us from November 9-12, 2009.
> Register now! http://p.sf.net/sfu/devconf
> _______________________________________________
> Ikvm-developers mailing list
> Ikvm-developers@...
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

Re: ClassInterfaceAttribute.Annotation?

by Valeriy Pikulskyy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've checked "0.41.3562" build: ClassInterfaceAttribute works now as
expected. Thank you, Jeroen!


On Fri, Sep 18, 2009 at 7:17 PM, Jeroen Frijters <jeroen@...> wrote:

> Hi Valeriy,
>
> Some custom attributes aren't easily mapped onto Java annotations and ClassInterfaceAttribute is one of them (because it has two constructors that both take an argument and no default constructor).
>
> One possible way to "solve" this is would be to add a list of special case custom attributes (mscorlib has a couple more of these) and specify which of the two constructors to ignore. It's a bit ugly, but it may be the best option.
>
> I'll consider this for 0.42.
>
> Regards,
> Jeroen
>
>> -----Original Message-----
>> From: Valeriy Pikulskyy [mailto:pikulsky@...]
>> Sent: Friday, September 18, 2009 4:55 PM
>> To: ikvm-developers@...
>> Subject: [Ikvm-developers] ClassInterfaceAttribute.Annotation?
>>
>> Hi Jeroen,
>> When I do "ikvmstub mscorlib", I have in the resulted mscorlib.jar
>> classes: ClassInterfaceAttribute, ClassInterfaceType, but there is no
>> ClassInterfaceAttribute.Annotation. How to fix this? My goal is to
>> compile the following code (IKVM-0.40.0.30):
>>
>> -- begin of test.java
>>
>> import cli.System.Runtime.InteropServices.ClassInterfaceAttribute;
>> import cli.System.Runtime.InteropServices.ClassInterfaceType;
>> import cli.System.Runtime.InteropServices.ComVisibleAttribute;
>>
>> @ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)
>>
>> @ComVisibleAttribute.Annotation(true)
>> interface assembly {}
>>
>> --- end of test.java
>>
>> Thank you.
>> Valeriy.
>>

>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ikvm-developers mailing list
Ikvm-developers@...
https://lists.sourceforge.net/lists/listinfo/ikvm-developers