本文整理汇总了Java中org.eclipse.emf.codegen.ecore.genmodel.GenClass.isMapEntry方法的典型用法代码示例。如果您正苦于以下问题:Java GenClass.isMapEntry方法的具体用法?Java GenClass.isMapEntry怎么用?Java GenClass.isMapEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.emf.codegen.ecore.genmodel.GenClass
的用法示例。
在下文中一共展示了GenClass.isMapEntry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGetAccessor
import org.eclipse.emf.codegen.ecore.genmodel.GenClass; //导入方法依赖的package包/类
public static String getGetAccessor(final GenFeature genFeature, final ResourceSet resourceSet) {
final GenClass genClass = genFeature.getGenClass();
boolean _isMapEntry = genClass.isMapEntry();
if (_isMapEntry) {
GenFeature _mapEntryKeyFeature = genClass.getMapEntryKeyFeature();
boolean _equals = Objects.equal(genFeature, _mapEntryKeyFeature);
if (_equals) {
return "getKey";
}
GenFeature _mapEntryValueFeature = genClass.getMapEntryValueFeature();
boolean _equals_1 = Objects.equal(genFeature, _mapEntryValueFeature);
if (_equals_1) {
return "getValue";
}
}
return genFeature.getGetAccessor();
}
示例2: getGetAccessor
import org.eclipse.emf.codegen.ecore.genmodel.GenClass; //导入方法依赖的package包/类
public String getGetAccessor(EStructuralFeature feature) {
GenFeature genFeature = GenModelAccess.getGenFeature(feature, resourceSet);
GenClass genClass = genFeature.getGenClass();
if (genClass.isMapEntry()) {
if (genFeature == genClass.getMapEntryKeyFeature())
return "getKey";
if (genFeature == genClass.getMapEntryValueFeature())
return "getValue";
}
return genFeature.getGetAccessor();
}
示例3: importedGenTypeName
import org.eclipse.emf.codegen.ecore.genmodel.GenClass; //导入方法依赖的package包/类
public String importedGenTypeName(EClass clazz) {
GenClass gc = GenModelAccess.getGenClass(clazz, resourceSet);
if (gc.isMapEntry()) {
String entryType = imported(BasicEMap.Entry.class);
return entryType + "<?, ?>";
}
return imported(gc.getQualifiedInterfaceName());
}