相关疑难解决方法(0)

EMF Eclipse:具有自定义字段(属性)的枚举

好的,所以在 Java 中这是可能的:

import org.eclipse.emf.common.util.Enumerator;

public enum MyEnum implements Enumerator {
   LITERAL1(0, "Name", "Literal", "custom1", "custom2", "custom3"),
   LITERAL2(0, "Name", "Literal", "custom1", "custom2", "custom3"),
   LITERAL3(0, "Name", "Literal", "custom1", "custom2", "custom3"),
   LITERAL4(0, "Name", "Literal", "custom1", "custom2", "custom3");

   public static final int LITERAL1_VALUE = 0;
   public static final int LITERAL2_VALUE = 1;
   public static final int LITERAL3_VALUE = 2;
   public static final int LITERAL4_VALUE = 3;

   private static final MyEnum[] VALUES_ARRAY =
        new MyEnum[] {
           LITERAL1,
           LITERAL2,
           LITERAL3,
           LITERAL4,
   };

   public static final …
Run Code Online (Sandbox Code Playgroud)

java eclipse enums eclipse-emf-ecore emf

5
推荐指数
1
解决办法
2074
查看次数

标签 统计

eclipse ×1

eclipse-emf-ecore ×1

emf ×1

enums ×1

java ×1