Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » [QVTo] No constructor defined, using implicit constructor
[QVTo] No constructor defined, using implicit constructor [message #1831363] Tue, 18 August 2020 08:46 Go to next message
Francesco Bedini is currently offline Francesco BediniFriend
Messages: 32
Registered: March 2018
Member
Hi,
I am creating model elements in this way:
var myVar : Type = new Type();


And I'm getting the following warning: No constructor defined, using implicit constructor (equal to empty inline instantiation)

How would an "empty inline instantiation" look like?

If I just do
var myVar : Type;

it doesn't seem to work.
Re: [QVTo] No constructor defined, using implicit constructor [message #1831364 is a reply to message #1831363] Tue, 18 August 2020 08:57 Go to previous messageGo to next message
Christopher Gerking is currently offline Christopher GerkingFriend
Messages: 115
Registered: April 2011
Senior Member
Hi, please use:

var myVar : Type = object Type {};

The new keyword is intended to invoke a constructor, which is a special type of QVTo operation that needs to be declared explicitly. In contrast, object allows you to instantiate arbitrary classes on the fly.
Re: [QVTo] No constructor defined, using implicit constructor [message #1831365 is a reply to message #1831364] Tue, 18 August 2020 09:09 Go to previous message
Francesco Bedini is currently offline Francesco BediniFriend
Messages: 32
Registered: March 2018
Member
Thanks a lot Christopher for the quick answer :)
Previous Topic:Problems when applying UML profile to an UML model
Next Topic:Adding EAttributes to EStructuralfeatures
Goto Forum:
  


Current Time: Thu Apr 25 05:10:12 GMT 2024

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

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

Back to the top