Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Small query on using Native
Small query on using Native [message #563879] Wed, 14 January 2009 10:55
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hia again,

I've found it very handy to create native Java objects using from Epsilon,
e.g., var x := new Native('javax.swing.JFrame'); . Out of interest, is it
possible to call static Java methods from Epsilon -- e.g., if you want a
java.util.Calendar object, you can use java.util.Calendar.getInstance();
and I'm not sure how to invoke this from Epsilon.

Also, I noticed that Native takes as parameter a String, e.g., new
Native('blah'). Is it possible to invoke Java constructors/methods that
accept as parameter existing Epsilon object references? E.g.,

var x : String := 'My JFrame Title';
var frame := new Native('javax.swing.JFrame', x); -- where x is passed as
the first parameter to the JFrame constructor.

(On a side note, I stumbled into the above ponderings when I was doing
some String manipulation in Epsilon, and was looking for an Epsilon String
operation (table 4.2 in the epsilon book) which found the length of a
String (I couldn't find this in the manual) -- instead I defined an ugly
implementation of it using the existing substring methods and charAt).

Thanks in advance,
Edd
Previous Topic:[Epsilon] Compare an enumeration value with a string in EVL
Next Topic:Small query on using Native
Goto Forum:
  


Current Time: Thu Apr 25 06:41:37 GMT 2024

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

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

Back to the top