org.eclipse.vorto.core.api.model.datatype.Enum.getName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(132)

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

Enum.getName介绍

暂无

代码示例

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

@Override
public String getFileName(final org.eclipse.vorto.core.api.model.datatype.Enum context) {
 String _name = context.getName();
 return (_name + "_CustomSlotType.txt");
}

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

StringConcatenation _builder = new StringConcatenation();
_builder.append("## Enum *");
String _name = en.getName();
_builder.append(_name, "");
_builder.append("*");
_builder.append("\t");
_builder.append("<tr><td>Name:</td><td>");
String _name_1 = en.getName();
_builder.append(_name_1, "\t");
_builder.append("</td></tr>");

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

@Override
public String getFileName(Enum en) {
  return en.getName() + javaFileExtension;
}

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

@Override
public String getFileName(final org.eclipse.vorto.core.api.model.datatype.Enum context) {
 String _name = context.getName();
 return (_name + "_CustomSlotType.txt");
}

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

@Override
public String getFileName(final org.eclipse.vorto.core.api.model.datatype.Enum dataEnum) {
 String _name = dataEnum.getName();
 return (_name + ".h");
}

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

@Override
public String getFileName(final org.eclipse.vorto.core.api.model.datatype.Enum context) {
 String _name = context.getName();
 return (_name + ".swift");
}

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

@Override
public String getFileName(Enum en) {
 return en.getName() + javaFileExtension;
}

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

@Override
public String getFileName(Enum en) {
  return en.getName() + javaFileExtension;
}

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

@Override
public String getFileName(Enum en) {
  return en.getName() + javaFileExtension;
}

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

@Override
public String getFileName(Enum en) {
  return en.getName() + javaFileExtension;
}

代码示例来源:origin: org.eclipse.vorto/org.eclipse.vorto.editor.datatype

@Check
public void checkEnumName_Literal(final org.eclipse.vorto.core.api.model.datatype.Enum ent) {
 final String name = ent.getName();
 boolean _isCamelCasedName = this.isCamelCasedName(name);
 if (_isCamelCasedName) {
  this.error(DatatypeSystemMessage.ERROR_ENUMNAME_INVALID_CAMELCASE, ent, ModelPackage.Literals.MODEL__NAME);
 }
}

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

/**
 * Returns the parameter as string
 */
public static String getParameterTypeAsString(final Param parameter) {
 if ((parameter instanceof PrimitiveParam)) {
  PrimitiveType _type = ((PrimitiveParam) parameter).getType();
  return ValueMapper.mapSimpleDatatype(((PrimitiveType) _type));
 } else {
  if ((parameter instanceof RefParam)) {
   RefParam object = ((RefParam) parameter);
   Type _type_1 = object.getType();
   if ((_type_1 instanceof Entity)) {
    Type _type_2 = object.getType();
    String _name = ((Entity) _type_2).getName();
    return StringExtensions.toFirstUpper(_name);
   } else {
    Type _type_3 = object.getType();
    if ((_type_3 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) {
     Type _type_4 = object.getType();
     String _name_1 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_4).getName();
     return StringExtensions.toFirstUpper(_name_1);
    }
   }
  }
 }
 return null;
}

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

/**
 * Returns the parameter as string
 */
public static String getParameterTypeAsString(final Param parameter) {
 if ((parameter instanceof PrimitiveParam)) {
  PrimitiveType _type = ((PrimitiveParam) parameter).getType();
  return ValueMapper.mapSimpleDatatype(((PrimitiveType) _type));
 } else {
  if ((parameter instanceof RefParam)) {
   RefParam object = ((RefParam) parameter);
   Type _type_1 = object.getType();
   if ((_type_1 instanceof Entity)) {
    Type _type_2 = object.getType();
    String _name = ((Entity) _type_2).getName();
    return StringExtensions.toFirstUpper(_name);
   } else {
    Type _type_3 = object.getType();
    if ((_type_3 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) {
     Type _type_4 = object.getType();
     String _name_1 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_4).getName();
     return StringExtensions.toFirstUpper(_name_1);
    }
   }
  }
 }
 return null;
}

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

if ((_type_7 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) {
 Type _type_8 = object.getType();
 String _name_1 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_8).getName();
 return StringExtensions.toFirstUpper(_name_1);

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

if ((_type_7 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) {
 Type _type_8 = object.getType();
 String _name_1 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_8).getName();
 return StringExtensions.toFirstUpper(_name_1);

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

@Override
 public String getContent(final org.eclipse.vorto.core.api.model.datatype.Enum context, final InvocationContext invocationContext) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("//Generated by Vorto");
  _builder.newLine();
  _builder.newLine();
  _builder.append("import Foundation");
  _builder.newLine();
  _builder.newLine();
  _builder.append("enum ");
  String _name = context.getName();
  _builder.append(_name, "");
  _builder.append(" {");
  _builder.newLineIfNotEmpty();
  _builder.newLine();
  {
   EList<EnumLiteral> _enums = context.getEnums();
   for(final EnumLiteral literal : _enums) {
    _builder.append("\t");
    _builder.append("case ");
    String _name_1 = literal.getName();
    _builder.append(_name_1, "\t");
    _builder.newLineIfNotEmpty();
   }
  }
  _builder.append("}");
  _builder.newLine();
  return _builder.toString();
 }
}

代码示例来源:origin: org.eclipse.vorto/generator-templates-java

if ((_type_3 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) {
 Type _type_4 = object.getType();
 String _name_3 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_4).getName();
 String _firstUpper_1 = StringExtensions.toFirstUpper(_name_3);
 _builder.append(_firstUpper_1, "");

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

if ((_type_3 instanceof org.eclipse.vorto.core.api.model.datatype.Enum)) {
 Type _type_4 = object.getType();
 String _name_3 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_4).getName();
 String _firstUpper_1 = StringExtensions.toFirstUpper(_name_3);
 _builder.append(_firstUpper_1, "");

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

_builder.append("private ");
Type _type_8 = object.getType();
String _name_3 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_8).getName();
String _firstUpper_1 = StringExtensions.toFirstUpper(_name_3);
_builder.append(_firstUpper_1, "");

代码示例来源:origin: org.eclipse.vorto/generator-templates-java

_builder.append(_namespaceOfDatatype_1, "");
Type _type_8 = object.getType();
String _name_3 = ((org.eclipse.vorto.core.api.model.datatype.Enum) _type_8).getName();
String _firstUpper_1 = StringExtensions.toFirstUpper(_name_3);
_builder.append(_firstUpper_1, "");

相关文章