Forum: EMF |
---|
Topic: Library Upgrade Issues |
---|
|
Forum: Java Development Tools (JDT) |
---|
Topic: Eclipse for Java syntax checker error for generic arrays |
---|
Re: Eclipse for Java syntax checker error for generic arrays [message #1864892 is a reply to message #1862674] |
Fri, 19 April 2024 04:09 |
doria avallone Messages: 1 Registered: April 2024 |
Junior Member |
|
|
In Java, you cannot directly create arrays of a generic type. This is because generic types are erased at runtime, and the JVM needs to know the specific type that the array will hold to ensure type safety. This code suppresses the unchecked warning because we are manually ensuring that the array will only contain MyClass<Long> instances. It's important to be cautious with this approach to avoid introducing potential ClassCastExceptions at runtime.
MyClass<Long>[] longsort = new MyClass<Long>[5];
@SuppressWarnings("unchecked")
MyClass<Long>[] longsort = (MyClass<Long>[])new MyClass[5];
ArrayList<MyClass<Long>> longsort = new ArrayList<>(5);
|
|
|
Topic: "Best backend for MySQL and TensorFlow?" |
---|
|
Forum: Paho |
---|
Topic: install eclipse paho broker |
---|
Re: install eclipse paho broker [message #1864898 is a reply to message #1864890] |
Fri, 19 April 2024 12:14 |
|
Paho is a collection of MQTT client libraries. For an MQTT broker, you may want to look at Eclipse Mosquitto, or one of the various other MQTT brokers that are available.
Developer Advocate | Eclipse Paho project | mqtt.org | andypiper.me
|
|
|
Forum: Epsilon |
---|
Topic: Is it possible to create enumeration ? |
---|
Is it possible to create enumeration ? [message #1864899] |
Fri, 19 April 2024 12:24 |
fang yan Messages: 26 Registered: October 2020 |
Junior Member |
|
|
Hi,
Is it possible to define an enumeration type in EOL/ETL/EGL?
There are enumerations in the metamodel, but besides those, I need more enumerations during transformation.
Thanks
Fang
|
|
|
Re: Is it possible to create enumeration ? [message #1864900 is a reply to message #1864899] |
Fri, 19 April 2024 12:29 |
|
Hi Fang,
EOL et. al. don't provide any dedicated syntax for creating enumerations or types in general. The expectation is that all types/enumerations come from the metamodels of the models that the program has access to. Could you please elaborate a bit more on what you're trying to achieve in case we can recommend any alternative options?
Thanks,
Dimitris
|
|
|
Powered by
FUDForum. Page generated in 0.01803 seconds