Java Code Examples for com.google.protobuf.Descriptors.OneofDescriptor#getContainingType()

The following examples show how to use com.google.protobuf.Descriptors.OneofDescriptor#getContainingType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DynamicMessage.java    From play-store-api with GNU General Public License v3.0 5 votes vote down vote up
/** Verifies that the oneof is an oneof of this message. */
private void verifyOneofContainingType(OneofDescriptor oneof) {
  if (oneof.getContainingType() != type) {
    throw new IllegalArgumentException(
      "OneofDescriptor does not match message type.");
  }
}
 
Example 2
Source File: DynamicMessage.java    From play-store-api with GNU General Public License v3.0 5 votes vote down vote up
/** Verifies that the oneof is an oneof of this message. */
private void verifyOneofContainingType(OneofDescriptor oneof) {
  if (oneof.getContainingType() != type) {
    throw new IllegalArgumentException(
      "OneofDescriptor does not match message type.");
  }
}
 
Example 3
Source File: GeneratedMessage.java    From play-store-api with GNU General Public License v3.0 5 votes vote down vote up
/** Get the OneofAccessor for a particular oneof. */
private OneofAccessor getOneof(final OneofDescriptor oneof) {
  if (oneof.getContainingType() != descriptor) {
    throw new IllegalArgumentException(
      "OneofDescriptor does not match message type.");
  }
  return oneofs[oneof.getIndex()];
}
 
Example 4
Source File: DynamicMessage.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/** Verifies that the oneof is an oneof of this message. */
private void verifyOneofContainingType(OneofDescriptor oneof) {
  if (oneof.getContainingType() != type) {
    throw new IllegalArgumentException(
      "OneofDescriptor does not match message type.");
  }
}
 
Example 5
Source File: DynamicMessage.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/** Verifies that the oneof is an oneof of this message. */
private void verifyOneofContainingType(OneofDescriptor oneof) {
  if (oneof.getContainingType() != type) {
    throw new IllegalArgumentException(
      "OneofDescriptor does not match message type.");
  }
}
 
Example 6
Source File: GeneratedMessage.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/** Get the OneofAccessor for a particular oneof. */
private OneofAccessor getOneof(final OneofDescriptor oneof) {
  if (oneof.getContainingType() != descriptor) {
    throw new IllegalArgumentException(
      "OneofDescriptor does not match message type.");
  }
  return oneofs[oneof.getIndex()];
}