Skip to main content



      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 04:46 Go to next message
Eclipse UserFriend
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 04:57 Go to previous messageGo to next message
Eclipse UserFriend
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 05:09 Go to previous message
Eclipse UserFriend
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 Jun 12 22:05:21 EDT 2025

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

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

Back to the top