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


Java Switch类代码示例

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


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

示例1: doSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
@Override
protected String doSwitch(EClass theEClass, EObject theEObject) {
    List<EClass> typesToCheck = Lists.newLinkedList(theEClass.getEAllSuperTypes());
    typesToCheck.add(0, theEClass);
    typesToCheck.remove(CommonsPackage.eINSTANCE.getCommentable());
    for (EClass eclass : typesToCheck) {
        Switch<String> delegate = findDelegate(eclass.getEPackage());
        if (delegate != null) {
            String result = delegatedDoSwitch(delegate, eclass, theEObject);
            if (result != null) {
                return result;
            }
        }
    }
    return defaultCase(theEObject);
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:17,代码来源:JaMoPPElementUtil.java

示例2: doSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
@Override
protected Iterable<String> doSwitch(EClass theEClass, EObject theEObject) {
    List<EClass> typesToCheck = Lists.newLinkedList(theEClass.getEAllSuperTypes());
    typesToCheck.add(0, theEClass);
    typesToCheck.remove(CommonsPackage.eINSTANCE.getCommentable());
    for (EClass eclass : typesToCheck) {
        Switch<Iterable<String>> delegate = findDelegate(eclass.getEPackage());
        if (delegate != null) {
            Iterable<String> result = delegatedDoSwitch(delegate, eclass, theEObject);
            if (result != null) {
                return result;
            }
        }
    }
    return defaultCase(theEObject);
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:17,代码来源:JaMoPPSemanticContentProviderSwitch.java

示例3: catchExceptions

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
@Override
public IThrownExceptionDelegate catchExceptions(List<LightweightTypeReference> caughtExceptions) {
	if (caughtExceptions.isEmpty()) {
		return this;
	}
	FilteringThrownExceptionDelegate delegate = new FilteringThrownExceptionDelegate(this, caughtExceptions);
	Switch<Boolean> collector = createThrownExceptionCollector(delegate);
	delegate.collectWith(collector);
	return delegate;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:11,代码来源:ExtendedEarlyExitComputer.java

示例4: getThrownExceptions

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
public List<LightweightTypeReference> getThrownExceptions(XExpression obj, IResolvedTypes types, ITypeReferenceOwner owner) {
	if (obj == null) {
		return Collections.emptyList();
	}
	final List<LightweightTypeReference> result = Lists.newArrayListWithExpectedSize(2);
	ThrownExceptionDelegate delegate = createDelegate(result, types, owner);
	Switch<Boolean> collector = createThrownExceptionCollector(delegate);
	delegate.collectWith(collector);
	delegate.collectThrownExceptions(obj);
	return result;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:12,代码来源:ExtendedEarlyExitComputer.java

示例5: collectWith

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
public void collectWith(Switch<Boolean> collector) {
	this.collector = collector;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:4,代码来源:ExtendedEarlyExitComputer.java

示例6: createThrownExceptionCollector

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
protected Switch<Boolean> createThrownExceptionCollector(IThrownExceptionDelegate delegate) {
	return new ThrownExceptionSwitch(delegate);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:4,代码来源:ExtendedEarlyExitComputer.java

示例7: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(gluemodel.CIM.IEC61970.Wires.Switch object) {
	return null;
}
 
开发者ID:georghinkel,项目名称:ttc2017smartGrids,代码行数:15,代码来源:WiresSwitch.java

示例8: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(CIM.IEC61970.Wires.Switch object) {
	return null;
}
 
开发者ID:georghinkel,项目名称:ttc2017smartGrids,代码行数:15,代码来源:WiresSwitch.java

示例9: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(com.wireframesketcher.model.Switch object) {
	return null;
}
 
开发者ID:Jose-Badeau,项目名称:boomslang-wireframesketcher,代码行数:15,代码来源:ModelSwitch.java

示例10: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(hu.bme.mit.trainbenchmark.ttc.railway.Switch object) {
	return null;
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:15,代码来源:RailwaySwitch.java

示例11: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(de.uni_hildesheim.sse.vil.templatelang.templateLang.Switch object)
{
  return null;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:16,代码来源:TemplateLangSwitch.java

示例12: containsClassInterfaceOrEnumWithName

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Checks whether a given container has a class, interface or enumeration with a given
 * name.
 * 
 * @param container
 *            The container.
 * @param name
 *            The {@link String} name.
 * @return <code>true</code> if such an entity was found; <code>false</code> otherwise.
 */
public static boolean containsClassInterfaceOrEnumWithName(Commentable container, String name) {
    Switch<Boolean> switcher = new ContainerHasConflictingNameSwitch(name);
    return switcher.doSwitch(container);
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:15,代码来源:RefactoringUtil.java

示例13: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(psdstructure.Switch object) {
	return null;
}
 
开发者ID:glovas,项目名称:psd-ui-generator,代码行数:15,代码来源:PsdstructureSwitch.java

示例14: caseSwitch

import org.eclipse.emf.ecore.util.Switch; //导入依赖的package包/类
/**
 * Returns the result of interpreting the object as an instance of '<em>Switch</em>'.
 * <!-- begin-user-doc -->
 * This implementation returns null;
 * returning a non-null result will terminate the switch.
 * <!-- end-user-doc -->
 * @param object the target of the switch.
 * @return the result of interpreting the object as an instance of '<em>Switch</em>'.
 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 * @generated
 */
public T caseSwitch(de.unidue.ecg.dialogScript.dialogScript.Switch object)
{
  return null;
}
 
开发者ID:RobertWalter83,项目名称:DialogScriptDSL,代码行数:16,代码来源:DialogScriptSwitch.java


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