當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。