multiple classes in file, which to execute?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple classes in file, which to execute?

Dierk König
Hi,

question about the GLS:

with multiple class declarations in a file and calling
 groovy filename
which class is supposed to be called
- the first one declared
- the one that's named after the file
?

Now the Groovy trivia: which one is currently chosen?

;-)

cheers
Mittie
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-jsr] multiple classes in file, which to execute?

Jochen Theodorou
Dierk Koenig schrieb:

> Hi,
>
> question about the GLS:
>
> with multiple class declarations in a file and calling
>  groovy filename
> which class is supposed to be called
> - the first one declared
> - the one that's named after the file
> ?
>
> Now the Groovy trivia: which one is currently chosen?
>
> ;-)

late answer, but anyway... the first one, or the script I think

bye blackdrag

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

RE: [groovy-jsr] multiple classes in file, which to execute?

Dierk König
yes, 100 points ! ;-)

The question is whether we want to have it that way, though.

Doit.groovy
----
class Helper {...}
class Doit { ... }
----

Should it really make a difference whether Helper is
declared before or after Doit?

cheers
Mittie

> -----Original Message-----
> From: Jochen Theodorou [mailto:[hidden email]]
> Sent: Montag, 29. Mai 2006 12:49
> To: [hidden email]
> Subject: Re: [groovy-jsr] multiple classes in file, which to execute?
>
>
> Dierk Koenig schrieb:
> > Hi,
> >
> > question about the GLS:
> >
> > with multiple class declarations in a file and calling
> >  groovy filename
> > which class is supposed to be called
> > - the first one declared
> > - the one that's named after the file
> > ?
> >
> > Now the Groovy trivia: which one is currently chosen?
> >
> > ;-)
>
> late answer, but anyway... the first one, or the script I think
>
> bye blackdrag
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: [groovy-jsr] multiple classes in file, which to execute?

Jochen Theodorou
Dierk Koenig schrieb:

> yes, 100 points ! ;-)
>
> The question is whether we want to have it that way, though.
>
> Doit.groovy
> ----
> class Helper {...}
> class Doit { ... }
> ----
>
> Should it really make a difference whether Helper is
> declared before or after Doit?

Yes, I think that is buggy. There is also another problem if additional
to these two classes is a script iside... you would get an error saying
something about defining two classes of the same name. Anyway... can you
fill a jira issue and assign it to me? I will fix that as soon as I have
fixed my classloader problem here.

bye blackdrag


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

RE: [groovy-jsr] multiple classes in file, which to execute?

Dierk König
done http://jira.codehaus.org/browse/GROOVY-1328

cheers
Mittie

> -----Original Message-----
> From: Jochen Theodorou [mailto:[hidden email]]
> Sent: Montag, 29. Mai 2006 13:01
> To: [hidden email]
> Subject: Re: [groovy-jsr] multiple classes in file, which to execute?
>
>
> Dierk Koenig schrieb:
> > yes, 100 points ! ;-)
> >
> > The question is whether we want to have it that way, though.
> >
> > Doit.groovy
> > ----
> > class Helper {...}
> > class Doit { ... }
> > ----
> >
> > Should it really make a difference whether Helper is
> > declared before or after Doit?
>
> Yes, I think that is buggy. There is also another problem if additional
> to these two classes is a script iside... you would get an error saying
> something about defining two classes of the same name. Anyway... can you
> fill a jira issue and assign it to me? I will fix that as soon as I have
> fixed my classloader problem here.
>
> bye blackdrag
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email