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