本文整理汇总了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;未经允许,请勿转载。 |
请发表评论