org.eclipse.vorto.codegen.utils.Utils.getReferencedEnums()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中org.eclipse.vorto.codegen.utils.Utils.getReferencedEnums()方法的一些代码示例,展示了Utils.getReferencedEnums()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getReferencedEnums()方法的具体详情如下:
包路径:org.eclipse.vorto.codegen.utils.Utils
类名称:Utils
方法名:getReferencedEnums

Utils.getReferencedEnums介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

_and = false;
} else {
 EList<org.eclipse.vorto.core.api.model.datatype.Enum> _referencedEnums = Utils.getReferencedEnums(fb);
 boolean _isEmpty = _referencedEnums.isEmpty();
 boolean _not = (!_isEmpty);
 EList<org.eclipse.vorto.core.api.model.datatype.Enum> _referencedEnums_1 = Utils.getReferencedEnums(fb);
 for (final org.eclipse.vorto.core.api.model.datatype.Enum enum_ : _referencedEnums_1) {
  boolean _and_1 = false;

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.prosystfi

exports.add(entity.getNamespace());
for (Enum en : Utils.getReferencedEnums(fb)) {
  if (! visited.contains(en)) {
    generateForEnum(infomodel, ctx, en, zipOutputter);

代码示例来源:origin: org.eclipse.vorto/boschiotsuite-gateway

exports.add(entity.getNamespace());
for (Enum en : Utils.getReferencedEnums(fb)) {
 if (!visited.contains(en)) {
  generateForEnum(ctx, en, zipOutputter);

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

public String getFirstValueEnum(final FunctionBlock fb, final PropertyType type) {
 EList<org.eclipse.vorto.core.api.model.datatype.Enum> _referencedEnums = Utils.getReferencedEnums(fb);
 for (final org.eclipse.vorto.core.api.model.datatype.Enum enum_ : _referencedEnums) {
  boolean _and = false;
  String _displayname = enum_.getDisplayname();
  Type _type = ((ObjectPropertyType) type).getType();
  String _name = _type.getName();
  boolean _equals = _displayname.equals(_name);
  if (!_equals) {
   _and = false;
  } else {
   String _namespace = enum_.getNamespace();
   Type _type_1 = ((ObjectPropertyType) type).getType();
   String _namespace_1 = _type_1.getNamespace();
   boolean _equals_1 = _namespace.equals(_namespace_1);
   _and = _equals_1;
  }
  if (_and) {
   EList<EnumLiteral> _enums = enum_.getEnums();
   EnumLiteral _get = _enums.get(0);
   return _get.getName();
  }
 }
 return "";
}

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.aws

/**
 * Generates Alexa Custom Slot Types for every Infomodel Enumeration
 */
public void generateCustomSlotTypes(final InformationModel infomodel, final InvocationContext context, final IGeneratedWriter output) {
 EList<FunctionblockProperty> _properties = infomodel.getProperties();
 for (final FunctionblockProperty fbModel : _properties) {
  {
   FunctionblockModel _type = fbModel.getType();
   FunctionBlock _functionblock = _type.getFunctionblock();
   EList<org.eclipse.vorto.core.api.model.datatype.Enum> enums = Utils.getReferencedEnums(_functionblock);
   for (final org.eclipse.vorto.core.api.model.datatype.Enum enumeration : enums) {
    {
     AlexaSlotTypeTemplate _alexaSlotTypeTemplate = new AlexaSlotTypeTemplate();
     GeneratorTaskFromFileTemplate<org.eclipse.vorto.core.api.model.datatype.Enum> _template = new GeneratorTaskFromFileTemplate<org.eclipse.vorto.core.api.model.datatype.Enum>(_alexaSlotTypeTemplate);
     _template.generate(enumeration, context, output);
    }
   }
  }
 }
}

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.aws

/**
 * Generates Alexa Custom Slot Types for every Infomodel Enumeration
 */
public void generateCustomSlotTypes(final InformationModel infomodel, final InvocationContext context, final IGeneratedWriter output) {
 EList<FunctionblockProperty> _properties = infomodel.getProperties();
 for (final FunctionblockProperty fbModel : _properties) {
  {
   FunctionblockModel _type = fbModel.getType();
   FunctionBlock _functionblock = _type.getFunctionblock();
   EList<org.eclipse.vorto.core.api.model.datatype.Enum> enums = Utils.getReferencedEnums(_functionblock);
   for (final org.eclipse.vorto.core.api.model.datatype.Enum enumeration : enums) {
    {
     AlexaSlotTypeTemplate _alexaSlotTypeTemplate = new AlexaSlotTypeTemplate();
     GeneratorTaskFromFileTemplate<org.eclipse.vorto.core.api.model.datatype.Enum> _template = new GeneratorTaskFromFileTemplate<org.eclipse.vorto.core.api.model.datatype.Enum>(_alexaSlotTypeTemplate);
     _template.generate(enumeration, context, output);
    }
   }
  }
 }
}

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.javabean

public IGenerationResult generate(InformationModel infomodel, InvocationContext invocationContext,
    IVortoCodeGenProgressMonitor monitor) throws VortoCodeGeneratorException {
  
  GenerationResultZip zipOutputter = new GenerationResultZip(infomodel,getServiceKey());
  
  for (FunctionblockProperty fbp : infomodel.getProperties()) {
    this.generateForFunctionBlock(infomodel, fbp.getType(), zipOutputter);
    FunctionBlock fb = fbp.getType().getFunctionblock();
    for (Entity entity : Utils.getReferencedEntities(fb)) {
      generateForEntity(infomodel, entity, zipOutputter);
    }
    for (Enum en : Utils.getReferencedEnums(fb)) {
      generateForEnum(infomodel, en, zipOutputter);
    }
  }
  
  new GeneratorTaskFromFileTemplate<InformationModel>(new PomFileTemplate()).generate(infomodel, invocationContext,zipOutputter);
  
  return zipOutputter;
}

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

EList<org.eclipse.vorto.core.api.model.datatype.Enum> _referencedEnums = Utils.getReferencedEnums(_functionblock_1);
for(final org.eclipse.vorto.core.api.model.datatype.Enum dataEnum : _referencedEnums) {
 _builder.append("#include \"../datatype/enum/");

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.arduino

FunctionblockModel _type_2 = fbProperty.getType();
FunctionBlock _functionblock = _type_2.getFunctionblock();
EList<org.eclipse.vorto.core.api.model.datatype.Enum> _referencedEnums = Utils.getReferencedEnums(_functionblock);
for (final org.eclipse.vorto.core.api.model.datatype.Enum enumProperty : _referencedEnums) {

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.examples.coap

generateForEntity(entity, zipOutputter);
for (Enum en : Utils.getReferencedEnums(fb)) {
  generateForEnum(en, zipOutputter);
  generateForEntity(entity, zipOutputter);
for (Enum en : Utils.getReferencedEnums(fb)) {
  generateForEnum(en, zipOutputter);

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.codegen.coap

generateForEntity(entity, zipOutputter);
for (Enum en : Utils.getReferencedEnums(fb)) {
  generateForEnum(en, zipOutputter);
  generateForEntity(entity, zipOutputter);
for (Enum en : Utils.getReferencedEnums(fb)) {
  generateForEnum(en, zipOutputter);

相关文章