Package com.google.eclipse.protobuf.protobuf

Examples of com.google.eclipse.protobuf.protobuf.ScalarType


  // message Person {
  //   optional int32 id = 1;
  // }
  @Test public void should_return_scalar_if_field_type_is_scalar() {
    MessageField field = xtext.find("id", MessageField.class);
    ScalarType type = fields.scalarTypeOf(field);
    assertThat(type.getName(), equalTo("int32"));
  }
View Full Code Here


   * Returns the name of the type of the given field.
   * @param field the given field.
   * @return the name of the type of the given field.
   */
  public String typeNameOf(MessageField field) {
    ScalarType scalarType = scalarTypeOf(field);
    if (scalarType != null) {
      return scalarType.getName();
    }
    ComplexType complexType = typeOf(field);
    if (complexType != null) {
      return complexType.getName();
    }
View Full Code Here

TOP

Related Classes of com.google.eclipse.protobuf.protobuf.ScalarType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.