Stephen wrote:
> 
> Daniel Frey wrote:
> 
>> Timothy,
>>
>> After a regexp search through my *.java files I find that I've got
>> exactly on component with two constructors. AnimationQueue has one
>> parameter-less and one parameter-ful constructor:
>>
>>     public AnimationQueue()
>>     public AnimationQueue(Image backgroundImage)
>>
>> However, this is not a compnent in Merlins sense as it is not
>> mentioned in any block.xml. It's just a class behind the scenes. Can
>> this be the cause?
>>
>> Or do you mean two constructors with the same signature?
> 
> I need to goo look at the code in detail - but basically what the
> exception is saying is that there is a component (i.e. a class with an
> associated .xinfo) that has multiple public constructors.  For a number
> of reasons this is considered to be ambigouse.
> 
> Cheers, Stephen.

I've got three .xinfo files in my build tree:

    Application.xinfo -- no constructors

    HierarchialResourceManagerFacade.xinfo -- no constructors

    SimpleSplash.xinfo -- two constructors
    public SimpleSplash(ImageIcon backgroundImage)
    public SimpleSplash(ImageIcon backgroundImage, Component component)

Bingo. I think that's the reason: No default constructor or configuraiton to
address one of the given constructors (if the second solution is possible).

I'm on the way to transform this class to a Merlin component. However, it
needs at least a ImageIcon for the background. How do I handle this with
Merlin? Do I need to have a default constructor and an mutator for the
backgroundImage property? Why not, seems kind of a proper solution... Except
that the Splash may be without background image, which would be nice to be
enforced by passing it in the constructor.

Thanks, Daniel

> 
>>
>> Thanks,
>> Daniel
>>
>> -----Ursprüngliche Nachricht-----
>> Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Timothy Bennett
>> Gesendet: Dienstag, 23. März 2004 23:26
>> An: [EMAIL PROTECTED]
>> Betreff: Re: Multiple constructor ambiguity
>>
>> Daniel Frey wrote:
>>
>>> Hi there,
>>>
>>> Sorry for my stupid questions: I don't have yet the feeling to know
>>> where errors come from. But may be you do.
>>>
>>>
>>> ---- exception report
>>> ---------------------------------------------------------------------
>>> Exception: org.apache.avalon.activation.LifecycleException
>>> Message: Multiple constructor ambiguity.
>>> ---- stack trace
>>> ---------------------------------------------------------------
>>> org.apache.avalon.activation.LifecycleException: Multiple constructor
>>> ambiguity.
>>
>>
>> Daniel,
>>
>> You wouldn't by chance have a component that has more than one
>> constructor defined would you?
>>
>> Timothy
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to