You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Prasad Kashyap <go...@gmail.com> on 2006/06/15 05:25:44 UTC
Instantiating a class in a modello DataModel
Hi,
How I can instantiate a class while declaring it as a field member in
a modello DataModel ?
field/association/type is another class that needs to be instantiated..
<field>
<name>myObj</name>
<version>1.0.0</version>
<association>
<type>MyClass</type>
</association>
MyClass myObj = new MyClass(); <<<------ is what I need
MyClass myObj; (= null) <<< ---- is what happens now.
Cheers
Prasad
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Instantiating a class in a modello DataModel
Posted by Brett Porter <br...@apache.org>.
use <defaultValue>new MyClass()</defaultValue>
Prasad Kashyap wrote:
> Hi,
>
> How I can instantiate a class while declaring it as a field member in
> a modello DataModel ?
>
> field/association/type is another class that needs to be instantiated..
>
> <field>
> <name>myObj</name>
> <version>1.0.0</version>
> <association>
> <type>MyClass</type>
> </association>
>
>
> MyClass myObj = new MyClass(); <<<------ is what I need
>
> MyClass myObj; (= null) <<< ---- is what happens now.
>
>
> Cheers
> Prasad
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
--
Brett Porter <br...@apache.org>
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org