当前位置: 首页>>代码示例>>Java>>正文


Java EClassifier类代码示例

本文整理汇总了Java中org.eclipse.emf.ecore.EClassifier的典型用法代码示例。如果您正苦于以下问题:Java EClassifier类的具体用法?Java EClassifier怎么用?Java EClassifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EClassifier类属于org.eclipse.emf.ecore包,在下文中一共展示了EClassifier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildNameIndex

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
public void buildNameIndex() {
	nameIndex = new HashMap<EClass, Map<String, IdEObject>>();
	for (EClassifier classifier : objects.values().iterator().next().eClass().getEPackage().getEClassifiers()) {
		if (classifier instanceof EClass) {
			Map<String, IdEObject> map = new TreeMap<String, IdEObject>();
			nameIndex.put((EClass) classifier, map);
		}
	}
	for (Long key : objects.keySet()) {
		IdEObject value = objects.get((Long) key);
		if (value instanceof IfcRoot) {
			IfcRoot ifcRoot = (IfcRoot) value;
			if (ifcRoot.getName() != null) {
				nameIndex.get(value.eClass()).put(ifcRoot.getName(), value);
			}
		}
	}
}
 
开发者ID:shenan4321,项目名称:BIMplatform,代码行数:19,代码来源:IfcModel.java

示例2: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : designPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:22,代码来源:DesignModelWizard.java

示例3: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : platformPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:22,代码来源:PlatformModelWizard.java

示例4: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : crtpPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:22,代码来源:CrtpModelWizard.java

示例5: getEEnumLiteral

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
public EEnumLiteral getEEnumLiteral(String enumName, String literalName) {
	EClassifier eClassifier = ePackage.getEClassifier(enumName);
	if (eClassifier == null) {
		throw new RuntimeException("Classifier " + enumName + " not found in package " + ePackage.getName());
	}
	if (eClassifier instanceof EEnum) {
		EEnum eEnum = (EEnum)eClassifier;
		EEnumLiteral literal = eEnum.getEEnumLiteral(literalName);
		if (literal == null) {
			throw new RuntimeException("No enum literal " + literalName + " found on " + ePackage.getName() + "." + enumName);
		}
		return literal;
	} else {
		throw new RuntimeException("Classifier " + enumName + " is not of type enum");
	}
}
 
开发者ID:shenan4321,项目名称:BIMplatform,代码行数:17,代码来源:PackageMetaData.java

示例6: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : grmPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:22,代码来源:GrmModelWizard.java

示例7: buildGuidIndex

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
public void buildGuidIndex() {
	guidIndex = new HashMap<EClass, Map<String, IdEObject>>();
	if (objects.isEmpty()) {
		return;
	}
	for (EClassifier classifier : objects.values().iterator().next().eClass().getEPackage().getEClassifiers()) {
		if (classifier instanceof EClass) {
			Map<String, IdEObject> map = new TreeMap<String, IdEObject>();
			guidIndex.put((EClass) classifier, map);
		}
	}
	for (Long key : objects.keySet()) {
		IdEObject value = objects.get((Long) key);
		if (value instanceof IfcRoot) {
			IfcRoot ifcRoot = (IfcRoot) value;
			guidIndex.get(value.eClass()).put(ifcRoot.getGlobalId(), value);
		}
	}
}
 
开发者ID:shenan4321,项目名称:BIMplatform,代码行数:20,代码来源:IfcModel.java

示例8: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : analysisPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:22,代码来源:AnalysisModelWizard.java

示例9: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames ()
{
    if ( initialObjectNames == null )
    {
        initialObjectNames = new ArrayList<String> ();
        for ( EClassifier eClassifier : profilePackage.getEClassifiers () )
        {
            if ( eClassifier instanceof EClass )
            {
                EClass eClass = (EClass)eClassifier;
                if ( !eClass.isAbstract () )
                {
                    initialObjectNames.add ( eClass.getName () );
                }
            }
        }
        Collections.sort ( initialObjectNames, CommonPlugin.INSTANCE.getComparator () );
    }
    return initialObjectNames;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:27,代码来源:ProfileModelWizard.java

示例10: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : fsmPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:22,代码来源:FsmModelWizard.java

示例11: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : srmPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:22,代码来源:SrmModelWizard.java

示例12: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Collection<String> getInitialObjectNames() {
	if (initialObjectNames == null) {
		initialObjectNames = new ArrayList<String>();
		for (EClassifier eClassifier : tracingannotationsPackage.getEClassifiers()) {
			if (eClassifier instanceof EClass) {
				EClass eClass = (EClass)eClassifier;
				if (!eClass.isAbstract()) {
					initialObjectNames.add(eClass.getName());
				}
			}
		}
		Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
	}
	return initialObjectNames;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:22,代码来源:TracingannotationsModelWizard.java

示例13: initOppositeInfo

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
private void initOppositeInfo() {
	for (EClassifier eClassifier : ePackage.getEClassifiers()) {
		if (eClassifier instanceof EClass) {
			EClass eClass = (EClass)eClassifier;
			boolean hasOpposites = false;
			boolean hasManyOpposites = false;
			for (EReference eReference : eClass.getEAllReferences()) {
				if (eReference.getEOpposite() != null) {
					hasOpposites = true;
					if (eReference.isMany()) {
						hasManyOpposites = true;
					}
				}
			}
			oppositeInfos.put(eClass, new OppositeInfo(hasOpposites, hasManyOpposites));
		}
	}
}
 
开发者ID:shenan4321,项目名称:BIMplatform,代码行数:19,代码来源:PackageMetaData.java

示例14: getInitialObjectNames

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
/**
 * Returns the names of the types that can be created as the root object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
protected Collection<String> getInitialObjectNames ()
{
    if ( this.initialObjectNames == null )
    {
        this.initialObjectNames = new ArrayList<String> ();
        for ( EClassifier eClassifier : this.worldPackage.getEClassifiers () )
        {
            if ( eClassifier instanceof EClass )
            {
                EClass eClass = (EClass)eClassifier;
                if ( !eClass.isAbstract () )
                {
                    this.initialObjectNames.add ( eClass.getName () );
                }
            }
        }
        Collections.sort ( this.initialObjectNames, CommonPlugin.INSTANCE.getComparator () );
    }
    return this.initialObjectNames;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:28,代码来源:WorldModelWizard.java

示例15: rewriteTypeReferences

import org.eclipse.emf.ecore.EClassifier; //导入依赖的package包/类
private static void rewriteTypeReferences(N4JSGrammarAccess ga,
		ImmutableMap.Builder<AbstractElement, Integer> builder) {
	for (ParserRule rule : GrammarUtil.allParserRules(ga.getGrammar())) {
		for (EObject obj : EcoreUtil2.eAllContents(rule.getAlternatives())) {
			if (obj instanceof Assignment) {
				Assignment assignment = (Assignment) obj;
				AbstractElement terminal = assignment.getTerminal();
				if (terminal instanceof RuleCall) {
					AbstractRule calledRule = ((RuleCall) terminal).getRule();
					EClassifier classifier = calledRule.getType().getClassifier();
					if (classifier instanceof EClass
							&& TypeRefsPackage.Literals.TYPE_REF.isSuperTypeOf((EClass) classifier)) {
						builder.put(assignment, TYPE_REF_TOKEN);
					}
				}
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:TokenTypeRewriter.java


注:本文中的org.eclipse.emf.ecore.EClassifier类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。