java类org.eclipse.emf.ecore.util.Switch的实例源码

JaMoPPElementUtil.java 文件源码 项目:SPLevo 阅读 20 收藏 0 点赞 0 评论 0
@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);
}
JaMoPPSemanticContentProviderSwitch.java 文件源码 项目:SPLevo 阅读 16 收藏 0 点赞 0 评论 0
@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);
}
ExtendedEarlyExitComputer.java 文件源码 项目:xtext-extras 阅读 18 收藏 0 点赞 0 评论 0
@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;
}
ExtendedEarlyExitComputer.java 文件源码 项目:xtext-extras 阅读 21 收藏 0 点赞 0 评论 0
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;
}
ExtendedEarlyExitComputer.java 文件源码 项目:xtext-extras 阅读 19 收藏 0 点赞 0 评论 0
public void collectWith(Switch<Boolean> collector) {
    this.collector = collector;
}
ExtendedEarlyExitComputer.java 文件源码 项目:xtext-extras 阅读 21 收藏 0 点赞 0 评论 0
protected Switch<Boolean> createThrownExceptionCollector(IThrownExceptionDelegate delegate) {
    return new ThrownExceptionSwitch(delegate);
}
WiresSwitch.java 文件源码 项目:ttc2017smartGrids 阅读 20 收藏 0 点赞 0 评论 0
/**
 * 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;
}
WiresSwitch.java 文件源码 项目:ttc2017smartGrids 阅读 18 收藏 0 点赞 0 评论 0
/**
 * 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;
}
WiresSwitch.java 文件源码 项目:rgse.ttc17.emoflon.tgg 阅读 25 收藏 0 点赞 0 评论 0
/**
 * 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;
}
ModelSwitch.java 文件源码 项目:boomslang-wireframesketcher 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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;
}
RailwaySwitch.java 文件源码 项目:trainbenchmark-ttc 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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;
}
TemplateLangSwitch.java 文件源码 项目:EASyProducer 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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;
}
RefactoringUtil.java 文件源码 项目:SPLevo 阅读 26 收藏 0 点赞 0 评论 0
/**
 * 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);
}
PsdstructureSwitch.java 文件源码 项目:psd-ui-generator 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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;
}
DialogScriptSwitch.java 文件源码 项目:DialogScriptDSL 阅读 23 收藏 0 点赞 0 评论 0
/**
 * 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;
}


问题


面经


文章

微信
公众号

扫码关注公众号