本文整理汇总了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);
}
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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");
}
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
}
}
示例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;
}
示例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);
}
}
}
}
}
}