• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IJvmDeclaredTypeAcceptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject machine, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (machine instanceof MachineDecl) {
    _infer((MachineDecl)machine, acceptor, isPreIndexingPhase);
    return;
  } else if (machine instanceof NameSpace) {
    _infer((NameSpace)machine, acceptor, isPreIndexingPhase);
    return;
  } else if (machine instanceof UseDecl) {
    _infer((UseDecl)machine, acceptor, isPreIndexingPhase);
    return;
  } else if (machine != null) {
    _infer(machine, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(machine, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:fmca,项目名称:Tupi,代码行数:19,代码来源:TupiJvmModelInferrer.java


示例2: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (element instanceof Model) {
    _infer((Model)element, acceptor, isPreIndexingPhase);
    return;
  } else if (element != null) {
    _infer(element, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:DSLPoliciesJvmModelInferrer.java


示例3: _infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
protected void _infer(final Model m, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) {
  final XBlockExpression e = m.getBlock();
  final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> {
    EList<JvmMember> _members = it.getMembers();
    final Procedure1<JvmOperation> _function_1 = (JvmOperation it_1) -> {
      EList<JvmTypeReference> _exceptions = it_1.getExceptions();
      JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Throwable.class);
      this._jvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeRef);
      this._jvmTypesBuilder.setBody(it_1, e);
    };
    JvmOperation _method = this._jvmTypesBuilder.toMethod(e, "myMethod", this._jvmTypesBuilder.inferredType(), _function_1);
    this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
  };
  acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(e, this.name(e.eResource())), _function);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:16,代码来源:PureXbaseJvmModelInferrer.java


示例4: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject m, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) {
  if (m instanceof Model) {
    _infer((Model)m, acceptor, prelinkingPhase);
    return;
  } else if (m != null) {
    _infer(m, acceptor, prelinkingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(m, acceptor, prelinkingPhase).toString());
  }
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:13,代码来源:PureXbaseJvmModelInferrer.java


示例5: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
@Override
public void infer(final EObject e, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) {
  final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> {
    EList<JvmMember> _members = it.getMembers();
    final Procedure1<JvmOperation> _function_1 = (JvmOperation it_1) -> {
      EList<JvmFormalParameter> _parameters = it_1.getParameters();
      JvmFormalParameter _parameter = this._jvmTypesBuilder.toParameter(e, "s", this.references.getTypeForName(String.class, e));
      this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
      this._jvmTypesBuilder.setBody(it_1, ((XExpression) e));
    };
    JvmOperation _method = this._jvmTypesBuilder.toMethod(e, "doStuff", this.references.getTypeForName(String.class, e), _function_1);
    this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
  };
  acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(((XExpression) e), "Test"), _function);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:16,代码来源:SimpleJvmModelInferrer.java


示例6: _infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
protected void _infer(final Bug462047Element element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  String _name = element.getName();
  String _plus = ("CORE." + _name);
  final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> {
    StringConcatenation _builder = new StringConcatenation();
    JvmGenericType _ref = element.getRef();
    String _qualifiedName = null;
    if (_ref!=null) {
      _qualifiedName=_ref.getQualifiedName();
    }
    _builder.append(_qualifiedName);
    this._jvmTypesBuilder.setDocumentation(it, _builder.toString());
  };
  acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(element, _plus), _function);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:16,代码来源:Bug462047LangJvmModelInferrer.java


示例7: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (element instanceof Bug462047Element) {
    _infer((Bug462047Element)element, acceptor, isPreIndexingPhase);
    return;
  } else if (element != null) {
    _infer(element, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:13,代码来源:Bug462047LangJvmModelInferrer.java


示例8: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (element instanceof ContentAssistFragmentTestLanguageRoot) {
    _infer((ContentAssistFragmentTestLanguageRoot)element, acceptor, isPreIndexingPhase);
    return;
  } else if (element != null) {
    _infer(element, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:13,代码来源:ContentAssistFragmentTestLangJvmModelInferrer.java


示例9: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (element instanceof Root) {
    _infer((Root)element, acceptor, isPreIndexingPhase);
    return;
  } else if (element != null) {
    _infer(element, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:niksavis,项目名称:mm-dsl,代码行数:13,代码来源:MMDSLJvmModelInferrer.java


示例10: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject file, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (file instanceof BuildFile) {
    _infer((BuildFile)file, acceptor, isPreIndexingPhase);
    return;
  } else if (file != null) {
    _infer(file, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(file, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:oehme,项目名称:xtext-maven-example,代码行数:13,代码来源:BuildDSLJvmModelInferrer.java


示例11: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject model, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (model instanceof ExpressionsModel) {
    _infer((ExpressionsModel)model, acceptor, isPreIndexingPhase);
    return;
  } else if (model != null) {
    _infer(model, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(model, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:LorenzoBettini,项目名称:packtpub-xtext-book-examples,代码行数:13,代码来源:ExpressionsJvmModelInferrer.java


示例12: infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
public void infer(final EObject entity, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  if (entity instanceof Entity) {
    _infer((Entity)entity, acceptor, isPreIndexingPhase);
    return;
  } else if (entity != null) {
    _infer(entity, acceptor, isPreIndexingPhase);
    return;
  } else {
    throw new IllegalArgumentException("Unhandled parameter types: " +
      Arrays.<Object>asList(entity, acceptor, isPreIndexingPhase).toString());
  }
}
 
开发者ID:LorenzoBettini,项目名称:packtpub-xtext-book-examples,代码行数:13,代码来源:EntitiesJvmModelInferrer.java


示例13: _infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
protected void _infer(final NameSpace namespace, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  String _name = namespace.getName();
  this.namespaceStr.append(_name);
  super.infer(namespace, acceptor, isPreIndexingPhase);
}
 
开发者ID:fmca,项目名称:Tupi,代码行数:6,代码来源:TupiJvmModelInferrer.java


示例14: _infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
/**
 * The dispatch method {@code infer} is called for each instance of the
 * given element's type that is contained in a resource.
 * 
 * @param element
 *            the model to create one or more
 *            {@link org.eclipse.xtext.common.types.JvmDeclaredType declared
 *            types} from.
 * @param acceptor
 *            each created
 *            {@link org.eclipse.xtext.common.types.JvmDeclaredType type}
 *            without a container should be passed to the acceptor in order
 *            get attached to the current resource. The acceptor's
 *            {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType)
 *            accept(..)} method takes the constructed empty type for the
 *            pre-indexing phase. This one is further initialized in the
 *            indexing phase using the closure you pass to the returned
 *            {@link org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor.IPostIndexingInitializing#initializeLater(org.eclipse.xtext.xbase.lib.Procedures.Procedure1)
 *            initializeLater(..)}.
 * @param isPreIndexingPhase
 *            whether the method is called in a pre-indexing phase, i.e.
 *            when the global index is not yet fully updated. You must not
 *            rely on linking using the index if isPreIndexingPhase is
 *            <code>true</code>.
 */
protected void _infer(final ContentAssistFragmentTestLanguageRoot element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
  final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> {
    EList<JvmMember> _members = it.getMembers();
    final Procedure1<JvmOperation> _function_1 = (JvmOperation it_1) -> {
      this._jvmTypesBuilder.setBody(it_1, element.getExpression());
    };
    JvmOperation _method = this._jvmTypesBuilder.toMethod(element, "hello", this._typeReferenceBuilder.typeRef(Void.class), _function_1);
    this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
  };
  acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(element, "my.test.MyClass"), _function);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:37,代码来源:ContentAssistFragmentTestLangJvmModelInferrer.java


示例15: _infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
/**
 * The dispatch method {@code infer} is called for each instance of the
 * given element's type that is contained in a resource.
 * 
 * @param element
 *            the model to create one or more
 *            {@link org.eclipse.xtext.common.types.JvmDeclaredType declared
 *            types} from.
 * @param acceptor
 *            each created
 *            {@link org.eclipse.xtext.common.types.JvmDeclaredType type}
 *            without a container should be passed to the acceptor in order
 *            get attached to the current resource. The acceptor's
 *            {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType)
 *            accept(..)} method takes the constructed empty type for the
 *            pre-indexing phase. This one is further initialized in the
 *            indexing phase using the lambda you pass as the last argument.
 * @param isPreIndexingPhase
 *            whether the method is called in a pre-indexing phase, i.e.
 *            when the global index is not yet fully updated. You must not
 *            rely on linking using the index if isPreIndexingPhase is
 *            <code>true</code>.
 */
protected void _infer(final Model element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:26,代码来源:DSLPoliciesJvmModelInferrer.java


示例16: _infer

import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor; //导入依赖的package包/类
/**
 * The dispatch method {@code infer} is called for each instance of the
 * given element's type that is contained in a resource.
 * 
 * @param element
 *            the model to create one or more
 *            {@link org.eclipse.xtext.common.types.JvmDeclaredType declared
 *            types} from.
 * @param acceptor
 *            each created
 *            {@link org.eclipse.xtext.common.types.JvmDeclaredType type}
 *            without a container should be passed to the acceptor in order
 *            get attached to the current resource. The acceptor's
 *            {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType)
 *            accept(..)} method takes the constructed empty type for the
 *            pre-indexing phase. This one is further initialized in the
 *            indexing phase using the closure you pass to the returned
 *            {@link org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor.IPostIndexingInitializing#initializeLater(org.eclipse.xtext.xbase.lib.Procedures.Procedure1)
 *            initializeLater(..)}.
 * @param isPreIndexingPhase
 *            whether the method is called in a pre-indexing phase, i.e.
 *            when the global index is not yet fully updated. You must not
 *            rely on linking using the index if isPreIndexingPhase is
 *            <code>true</code>.
 */
protected void _infer(final Root element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) {
}
 
开发者ID:niksavis,项目名称:mm-dsl,代码行数:28,代码来源:MMDSLJvmModelInferrer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ThumbNailBuilder类代码示例发布时间:2022-05-23
下一篇:
Java OAuthRegisteredService类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap