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

Java Descriptor类代码示例

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

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



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

示例1: hasField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns whether {@code field} is present in {@code message}. */
@Override
@SuppressWarnings("unchecked")
public boolean hasField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  AndroidSchedulerEvent message = (AndroidSchedulerEvent) rawMessage;
  if (field == VERSION) {
    return message.hasVersion();
  }
  if (field == EVENT_NAME) {
    return message.hasEventName();
  }
  if (field == TICL_ID) {
    return message.hasTiclId();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:19,代码来源:AndroidServiceAccessor.java


示例2: hasField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns whether {@code field} is present in {@code message}. */
@Override
@SuppressWarnings("unchecked")
public boolean hasField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  ServerHeader message = (ServerHeader) rawMessage;
  if (field == PROTOCOL_VERSION) {
    return message.hasProtocolVersion();
  }
  if (field == CLIENT_TOKEN) {
    return message.hasClientToken();
  }
  if (field == REGISTRATION_SUMMARY) {
    return message.hasRegistrationSummary();
  }
  if (field == SERVER_TIME_MS) {
    return message.hasServerTimeMs();
  }
  if (field == MESSAGE_ID) {
    return message.hasMessageId();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:25,代码来源:ClientProtocolAccessor.java


示例3: getField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns the {@code field} from {@code message}. */
@Override
@SuppressWarnings("unchecked")
public Object getField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  ClientVersion message = (ClientVersion) rawMessage;
  if (field == VERSION) {
    return message.getVersion();
  }
  if (field == PLATFORM) {
    return message.getPlatform();
  }
  if (field == LANGUAGE) {
    return message.getLanguage();
  }
  if (field == APPLICATION_INFO) {
    return message.getApplicationInfo();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:22,代码来源:ClientProtocolAccessor.java


示例4: getField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns the {@code field} from {@code message}. */
@Override
@SuppressWarnings("unchecked")
public Object getField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  AndroidTiclState message = (AndroidTiclState) rawMessage;
  if (field == VERSION) {
    return message.getVersion();
  }
  if (field == TICL_STATE) {
    return message.getTiclState();
  }
  if (field == METADATA) {
    return message.getMetadata();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:19,代码来源:AndroidServiceAccessor.java


示例5: getField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns the {@code field} from {@code message}. */
@Override
@SuppressWarnings("unchecked")
public Object getField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  RegistrationFailureUpcall message = (RegistrationFailureUpcall) rawMessage;
  if (field == OBJECT_ID) {
    return message.getObjectId();
  }
  if (field == TRANSIENT) {
    return message.getTransient();
  }
  if (field == MESSAGE) {
    return message.getMessage();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:19,代码来源:AndroidServiceAccessor.java


示例6: hasField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns whether {@code field} is present in {@code message}. */
@Override
@SuppressWarnings("unchecked")
public boolean hasField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  InvalidateUpcall message = (InvalidateUpcall) rawMessage;
  if (field == ACK_HANDLE) {
    return message.hasAckHandle();
  }
  if (field == INVALIDATION) {
    return message.hasInvalidation();
  }
  if (field == INVALIDATE_UNKNOWN) {
    return message.hasInvalidateUnknown();
  }
  if (field == INVALIDATE_ALL) {
    return message.hasInvalidateAll();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:22,代码来源:AndroidServiceAccessor.java


示例7: hasField

import com.google.ipc.invalidation.common.ProtoValidator.Descriptor; //导入依赖的package包/类
/** Returns whether {@code field} is present in {@code message}. */
@Override
@SuppressWarnings("unchecked")
public boolean hasField(MessageLite rawMessage, Descriptor field) {
  Preconditions.checkNotNull(rawMessage);
  Preconditions.checkNotNull(field);
  InitializeMessage message = (InitializeMessage) rawMessage;
  if (field == CLIENT_TYPE) {
    return message.hasClientType();
  }
  if (field == NONCE) {
    return message.hasNonce();
  }
  if (field == APPLICATION_CLIENT_ID) {
    return message.hasApplicationClientId();
  }
  if (field == DIGEST_SERIALIZATION_TYPE) {
    return message.hasDigestSerializationType();
  }
  throw new IllegalArgumentException("Bad descriptor: " + field);
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:22,代码来源:ClientProtocolAccessor.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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