All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.javascript.jscomp.Requirement Maven / Gradle / Ivy

Go to download

Closure Compiler is a JavaScript optimizing compiler. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. It is used in many of Google's JavaScript apps, including Gmail, Google Web Search, Google Maps, and Google Docs. This binary checks for style issues such as incorrect or missing JSDoc usage, and missing goog.require() statements. It does not do more advanced checks such as typechecking.

There is a newer version: v20200830
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: conformance.proto

package com.google.javascript.jscomp;

/**
 * 
 * A specification of code requirements
 * NEXT ID: 15
 * 
* * Protobuf type {@code jscomp.Requirement} */ public final class Requirement extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage< Requirement> implements // @@protoc_insertion_point(message_implements:jscomp.Requirement) RequirementOrBuilder { // Use Requirement.newBuilder() to construct. private Requirement(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { super(builder); } private Requirement() { errorMessage_ = ""; whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY; whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; whitelistEntry_ = java.util.Collections.emptyList(); onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; type_ = 1; value_ = com.google.protobuf.LazyStringArrayList.EMPTY; typeMatchingStrategy_ = 1; javaClass_ = ""; ruleId_ = ""; extends_ = ""; reportLooseTypeViolations_ = true; severity_ = 1; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Requirement( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; errorMessage_ = bs; break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { whitelist_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } whitelist_.add(bs); break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } whitelistRegexp_.add(bs); break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyTo_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000010; } onlyApplyTo_.add(bs); break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { onlyApplyToRegexp_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000020; } onlyApplyToRegexp_.add(bs); break; } case 48: { int rawValue = input.readEnum(); com.google.javascript.jscomp.Requirement.Type value = com.google.javascript.jscomp.Requirement.Type.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(6, rawValue); } else { bitField0_ |= 0x00000002; type_ = rawValue; } break; } case 58: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { value_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000080; } value_.add(bs); break; } case 66: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; javaClass_ = bs; break; } case 74: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; ruleId_ = bs; break; } case 82: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; extends_ = bs; break; } case 88: { bitField0_ |= 0x00000040; reportLooseTypeViolations_ = input.readBool(); break; } case 96: { int rawValue = input.readEnum(); com.google.javascript.jscomp.Requirement.Severity value = com.google.javascript.jscomp.Requirement.Severity.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(12, rawValue); } else { bitField0_ |= 0x00000080; severity_ = rawValue; } break; } case 104: { int rawValue = input.readEnum(); com.google.javascript.jscomp.Requirement.TypeMatchingStrategy value = com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(13, rawValue); } else { bitField0_ |= 0x00000004; typeMatchingStrategy_ = rawValue; } break; } case 114: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { whitelistEntry_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } whitelistEntry_.add( input.readMessage(com.google.javascript.jscomp.Requirement.WhitelistEntry.PARSER, extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { whitelist_ = whitelist_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = whitelistRegexp_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyTo_ = onlyApplyTo_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { onlyApplyToRegexp_ = onlyApplyToRegexp_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { value_ = value_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { whitelistEntry_ = java.util.Collections.unmodifiableList(whitelistEntry_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.javascript.jscomp.Requirement.class, com.google.javascript.jscomp.Requirement.Builder.class); } /** *
   * A classification of the requirement and how it is enforced.
   * 
* * Protobuf enum {@code jscomp.Requirement.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** *
     * A requirement enforced with code a external java class.
     * 
* * CUSTOM = 1; */ CUSTOM(1), /** *
     * A forbidden source file
     * 
* * BANNED_DEPENDENCY = 2; */ BANNED_DEPENDENCY(2), /** * * *
     * Forbidden dependency (source or generated files) expressed via regexp.
     * 
* * BANNED_DEPENDENCY_REGEX = 14; */ BANNED_DEPENDENCY_REGEX(14), /** * * *
     * A forbidden fully distinguished name. For example:
     *  - A global name like "eval" or "goog"
     *  - A namespaced value or type:  namespace.Banned
     *  - A 'static' property:  "namespace.Foo.banned"
     * TODO(b/112325992): If namespace.Banned is a goog.module that does not
     * call goog.declareModuleId, the rule will not match.
     * 
* * BANNED_NAME = 3; */ BANNED_NAME(3), /** *
     * A banned instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * 
* * BANNED_PROPERTY = 4; */ BANNED_PROPERTY(4), /** *
     * A banned reading from an instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * Unlike BANNED_PROPERTY, this only bans reads to the property,
     * i.e. its use as an rvalue.
     * 
* * BANNED_PROPERTY_READ = 5; */ BANNED_PROPERTY_READ(5), /** *
     * A banned write to an instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * Unlike BANNED_PROPERTY, this only bans assignments to the property,
     * i.e. its use as an lvalue.
     * 
* * BANNED_PROPERTY_WRITE = 6; */ BANNED_PROPERTY_WRITE(6), /** *
     * A restricted call, for example:
     *  - the "parseInt" call must be called with a radix:
     *  parseInt:function(string, int)
     * 
* * RESTRICTED_NAME_CALL = 7; */ RESTRICTED_NAME_CALL(7), /** *
     * A restricted call, for example:
     *  - The unsafe opt_html parameter must not be passed to createNode:
     *  goog.ui.tree.TreeControl.prototype.createNode:function()
     * 
* * RESTRICTED_METHOD_CALL = 8; */ RESTRICTED_METHOD_CALL(8), /** *
     * A banned code pattern. This check is done using against an AST.
     * To ban a call to eval:
     *    "/** @param {?} a */ function template(a) {eval(a);}"
     * 
* * BANNED_CODE_PATTERN = 9; */ BANNED_CODE_PATTERN(9), /** *
     * A banned function call. for example:
     *  - An 'instance' property: "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * Unlike BANNED_PROPERTY, this only bans calls to the property
     * i.e. using the property as a value is allowed.
     * 
* * BANNED_PROPERTY_CALL = 10; */ BANNED_PROPERTY_CALL(10), /** *
     * A banned write of a non-constant value to an instance property.
     * Unlike BANNED_PROPERTY_WRITE, this only bans assignments of a
     * non-constant value.
     * 
* * BANNED_PROPERTY_NON_CONSTANT_WRITE = 11; */ BANNED_PROPERTY_NON_CONSTANT_WRITE(11), /** *
     * A banned function call.
     * Unlike BANNED_NAME, this only bans calls to the property, i.e. using the
     * property as a value is allowed.
     * 
* * BANNED_NAME_CALL = 12; */ BANNED_NAME_CALL(12), /** *
     * A restricted write to an instance property.
     * Example: "Element.prototype.innerHTML:!TrustedHTML|string"
     * 
* * RESTRICTED_PROPERTY_WRITE = 13; */ RESTRICTED_PROPERTY_WRITE(13), ; /** *
     * A requirement enforced with code a external java class.
     * 
* * CUSTOM = 1; */ public static final int CUSTOM_VALUE = 1; /** *
     * A forbidden source file
     * 
* * BANNED_DEPENDENCY = 2; */ public static final int BANNED_DEPENDENCY_VALUE = 2; /** * * *
     * Forbidden dependency (source or generated files) expressed via regexp.
     * 
* * BANNED_DEPENDENCY_REGEX = 14; */ public static final int BANNED_DEPENDENCY_REGEX_VALUE = 14; /** * * *
     * A forbidden fully distinguished name. For example:
     *  - A global name like "eval" or "goog"
     *  - A namespaced value or type:  namespace.Banned
     *  - A 'static' property:  "namespace.Foo.banned"
     * TODO(b/112325992): If namespace.Banned is a goog.module that does not
     * call goog.declareModuleId, the rule will not match.
     * 
* * BANNED_NAME = 3; */ public static final int BANNED_NAME_VALUE = 3; /** *
     * A banned instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * 
* * BANNED_PROPERTY = 4; */ public static final int BANNED_PROPERTY_VALUE = 4; /** *
     * A banned reading from an instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * Unlike BANNED_PROPERTY, this only bans reads to the property,
     * i.e. its use as an rvalue.
     * 
* * BANNED_PROPERTY_READ = 5; */ public static final int BANNED_PROPERTY_READ_VALUE = 5; /** *
     * A banned write to an instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * Unlike BANNED_PROPERTY, this only bans assignments to the property,
     * i.e. its use as an lvalue.
     * 
* * BANNED_PROPERTY_WRITE = 6; */ public static final int BANNED_PROPERTY_WRITE_VALUE = 6; /** *
     * A restricted call, for example:
     *  - the "parseInt" call must be called with a radix:
     *  parseInt:function(string, int)
     * 
* * RESTRICTED_NAME_CALL = 7; */ public static final int RESTRICTED_NAME_CALL_VALUE = 7; /** *
     * A restricted call, for example:
     *  - The unsafe opt_html parameter must not be passed to createNode:
     *  goog.ui.tree.TreeControl.prototype.createNode:function()
     * 
* * RESTRICTED_METHOD_CALL = 8; */ public static final int RESTRICTED_METHOD_CALL_VALUE = 8; /** *
     * A banned code pattern. This check is done using against an AST.
     * To ban a call to eval:
     *    "/** @param {?} a */ function template(a) {eval(a);}"
     * 
* * BANNED_CODE_PATTERN = 9; */ public static final int BANNED_CODE_PATTERN_VALUE = 9; /** *
     * A banned function call. for example:
     *  - An 'instance' property: "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * Unlike BANNED_PROPERTY, this only bans calls to the property
     * i.e. using the property as a value is allowed.
     * 
* * BANNED_PROPERTY_CALL = 10; */ public static final int BANNED_PROPERTY_CALL_VALUE = 10; /** *
     * A banned write of a non-constant value to an instance property.
     * Unlike BANNED_PROPERTY_WRITE, this only bans assignments of a
     * non-constant value.
     * 
* * BANNED_PROPERTY_NON_CONSTANT_WRITE = 11; */ public static final int BANNED_PROPERTY_NON_CONSTANT_WRITE_VALUE = 11; /** *
     * A banned function call.
     * Unlike BANNED_NAME, this only bans calls to the property, i.e. using the
     * property as a value is allowed.
     * 
* * BANNED_NAME_CALL = 12; */ public static final int BANNED_NAME_CALL_VALUE = 12; /** *
     * A restricted write to an instance property.
     * Example: "Element.prototype.innerHTML:!TrustedHTML|string"
     * 
* * RESTRICTED_PROPERTY_WRITE = 13; */ public static final int RESTRICTED_PROPERTY_WRITE_VALUE = 13; public final int getNumber() { return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } public static Type forNumber(int value) { switch (value) { case 1: return CUSTOM; case 2: return BANNED_DEPENDENCY; case 14: return BANNED_DEPENDENCY_REGEX; case 3: return BANNED_NAME; case 4: return BANNED_PROPERTY; case 5: return BANNED_PROPERTY_READ; case 6: return BANNED_PROPERTY_WRITE; case 7: return RESTRICTED_NAME_CALL; case 8: return RESTRICTED_METHOD_CALL; case 9: return BANNED_CODE_PATTERN; case 10: return BANNED_PROPERTY_CALL; case 11: return BANNED_PROPERTY_NON_CONSTANT_WRITE; case 12: return BANNED_NAME_CALL; case 13: return RESTRICTED_PROPERTY_WRITE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Type> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.javascript.jscomp.Requirement.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int value; private Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:jscomp.Requirement.Type) } /** * Protobuf enum {@code jscomp.Requirement.TypeMatchingStrategy} */ public enum TypeMatchingStrategy implements com.google.protobuf.ProtocolMessageEnum { /** * UNKNOWN = 0; */ UNKNOWN(0), /** *
     * Matches type or any subtype. Matches types with different
     * nullability/voidability. Allows loose matches.
     * 
* * LOOSE = 1; */ LOOSE(1), /** *
     * Matches type or any subtype. Does not match types with different
     * nullability/voidability. Allows loose matches.
     * 
* * STRICT_NULLABILITY = 2; */ STRICT_NULLABILITY(2), /** *
     * Matches type or any subtype. Does not match types with different
     * nullability/voidability. Does not allow loose matches.
     * 
* * SUBTYPES = 3; */ SUBTYPES(3), /** *
     * Does not match subtypes. Does not match types with different
     * nullability/voidability. Does not allow loose matches.
     * 
* * EXACT = 4; */ EXACT(4), ; /** * UNKNOWN = 0; */ public static final int UNKNOWN_VALUE = 0; /** *
     * Matches type or any subtype. Matches types with different
     * nullability/voidability. Allows loose matches.
     * 
* * LOOSE = 1; */ public static final int LOOSE_VALUE = 1; /** *
     * Matches type or any subtype. Does not match types with different
     * nullability/voidability. Allows loose matches.
     * 
* * STRICT_NULLABILITY = 2; */ public static final int STRICT_NULLABILITY_VALUE = 2; /** *
     * Matches type or any subtype. Does not match types with different
     * nullability/voidability. Does not allow loose matches.
     * 
* * SUBTYPES = 3; */ public static final int SUBTYPES_VALUE = 3; /** *
     * Does not match subtypes. Does not match types with different
     * nullability/voidability. Does not allow loose matches.
     * 
* * EXACT = 4; */ public static final int EXACT_VALUE = 4; public final int getNumber() { return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static TypeMatchingStrategy valueOf(int value) { return forNumber(value); } public static TypeMatchingStrategy forNumber(int value) { switch (value) { case 0: return UNKNOWN; case 1: return LOOSE; case 2: return STRICT_NULLABILITY; case 3: return SUBTYPES; case 4: return EXACT; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< TypeMatchingStrategy> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public TypeMatchingStrategy findValueByNumber(int number) { return TypeMatchingStrategy.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.javascript.jscomp.Requirement.getDescriptor().getEnumTypes().get(1); } private static final TypeMatchingStrategy[] VALUES = values(); public static TypeMatchingStrategy valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int value; private TypeMatchingStrategy(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:jscomp.Requirement.TypeMatchingStrategy) } /** *
   * With what severity to report the issue by default.
   * 
* * Protobuf enum {@code jscomp.Requirement.Severity} */ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Currently treated the same as WARNING.
     * 
* * UNSPECIFIED = 0; */ UNSPECIFIED(0), /** *
     * Allows the build to continue. Can be turned into an error by setting the
     * jscomp_error=conformanceConfig flag.
     * 
* * WARNING = 1; */ WARNING(1), /** *
     * The build fails if we are confident this is an error.
     * This causes an error even on possible violations, e.g. when the type
     * system is ambiguous.
     * 
* * ERROR = 2; */ ERROR(2), ; /** *
     * Currently treated the same as WARNING.
     * 
* * UNSPECIFIED = 0; */ public static final int UNSPECIFIED_VALUE = 0; /** *
     * Allows the build to continue. Can be turned into an error by setting the
     * jscomp_error=conformanceConfig flag.
     * 
* * WARNING = 1; */ public static final int WARNING_VALUE = 1; /** *
     * The build fails if we are confident this is an error.
     * This causes an error even on possible violations, e.g. when the type
     * system is ambiguous.
     * 
* * ERROR = 2; */ public static final int ERROR_VALUE = 2; public final int getNumber() { return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Severity valueOf(int value) { return forNumber(value); } public static Severity forNumber(int value) { switch (value) { case 0: return UNSPECIFIED; case 1: return WARNING; case 2: return ERROR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Severity> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Severity findValueByNumber(int number) { return Severity.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.javascript.jscomp.Requirement.getDescriptor().getEnumTypes().get(2); } private static final Severity[] VALUES = values(); public static Severity valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int value; private Severity(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:jscomp.Requirement.Severity) } public interface WhitelistEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:jscomp.Requirement.WhitelistEntry) com.google.protobuf.MessageOrBuilder { /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ boolean hasReason(); /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason getReason(); /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ java.util.List getPrefixList(); /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ int getPrefixCount(); /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ java.lang.String getPrefix(int index); /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ com.google.protobuf.ByteString getPrefixBytes(int index); /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ java.util.List getRegexpList(); /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ int getRegexpCount(); /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ java.lang.String getRegexp(int index); /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ com.google.protobuf.ByteString getRegexpBytes(int index); /** *
     * Short explanation.
     * 
* * optional string explanation = 4; */ boolean hasExplanation(); /** *
     * Short explanation.
     * 
* * optional string explanation = 4; */ java.lang.String getExplanation(); /** *
     * Short explanation.
     * 
* * optional string explanation = 4; */ com.google.protobuf.ByteString getExplanationBytes(); /** * repeated string comment = 5; */ java.util.List getCommentList(); /** * repeated string comment = 5; */ int getCommentCount(); /** * repeated string comment = 5; */ java.lang.String getComment(int index); /** * repeated string comment = 5; */ com.google.protobuf.ByteString getCommentBytes(int index); } /** * Protobuf type {@code jscomp.Requirement.WhitelistEntry} */ public static final class WhitelistEntry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:jscomp.Requirement.WhitelistEntry) WhitelistEntryOrBuilder { // Use WhitelistEntry.newBuilder() to construct. private WhitelistEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WhitelistEntry() { reason_ = 0; prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY; regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; explanation_ = ""; comment_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WhitelistEntry( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason value = com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; reason_ = rawValue; } break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { prefix_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } prefix_.add(bs); break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { regexp_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } regexp_.add(bs); break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; explanation_ = bs; break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { comment_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000010; } comment_.add(bs); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { prefix_ = prefix_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { regexp_ = regexp_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { comment_ = comment_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.javascript.jscomp.Requirement.WhitelistEntry.class, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder.class); } /** * Protobuf enum {@code jscomp.Requirement.WhitelistEntry.Reason} */ public enum Reason implements com.google.protobuf.ProtocolMessageEnum { /** * UNSPECIFIED = 0; */ UNSPECIFIED(0), /** * LEGACY = 1; */ LEGACY(1), /** * OUT_OF_SCOPE = 2; */ OUT_OF_SCOPE(2), /** * MANUALLY_REVIEWED = 3; */ MANUALLY_REVIEWED(3), ; /** * UNSPECIFIED = 0; */ public static final int UNSPECIFIED_VALUE = 0; /** * LEGACY = 1; */ public static final int LEGACY_VALUE = 1; /** * OUT_OF_SCOPE = 2; */ public static final int OUT_OF_SCOPE_VALUE = 2; /** * MANUALLY_REVIEWED = 3; */ public static final int MANUALLY_REVIEWED_VALUE = 3; public final int getNumber() { return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Reason valueOf(int value) { return forNumber(value); } public static Reason forNumber(int value) { switch (value) { case 0: return UNSPECIFIED; case 1: return LEGACY; case 2: return OUT_OF_SCOPE; case 3: return MANUALLY_REVIEWED; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Reason> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Reason findValueByNumber(int number) { return Reason.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.javascript.jscomp.Requirement.WhitelistEntry.getDescriptor().getEnumTypes().get(0); } private static final Reason[] VALUES = values(); public static Reason valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int value; private Reason(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:jscomp.Requirement.WhitelistEntry.Reason) } private int bitField0_; public static final int REASON_FIELD_NUMBER = 1; private int reason_; /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ public boolean hasReason() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason getReason() { com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason result = com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.valueOf(reason_); return result == null ? com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.UNSPECIFIED : result; } public static final int PREFIX_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList prefix_; /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ public com.google.protobuf.ProtocolStringList getPrefixList() { return prefix_; } /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ public int getPrefixCount() { return prefix_.size(); } /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ public java.lang.String getPrefix(int index) { return prefix_.get(index); } /** *
     * A list of source path prefixes.
     * 
* * repeated string prefix = 2; */ public com.google.protobuf.ByteString getPrefixBytes(int index) { return prefix_.getByteString(index); } public static final int REGEXP_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList regexp_; /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ public com.google.protobuf.ProtocolStringList getRegexpList() { return regexp_; } /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ public int getRegexpCount() { return regexp_.size(); } /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ public java.lang.String getRegexp(int index) { return regexp_.get(index); } /** *
     * A list of regexes matching sources to be ignored
     * 
* * repeated string regexp = 3; */ public com.google.protobuf.ByteString getRegexpBytes(int index) { return regexp_.getByteString(index); } public static final int EXPLANATION_FIELD_NUMBER = 4; private volatile java.lang.Object explanation_; /** *
     * Short explanation.
     * 
* * optional string explanation = 4; */ public boolean hasExplanation() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** *
     * Short explanation.
     * 
* * optional string explanation = 4; */ public java.lang.String getExplanation() { java.lang.Object ref = explanation_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { explanation_ = s; } return s; } } /** *
     * Short explanation.
     * 
* * optional string explanation = 4; */ public com.google.protobuf.ByteString getExplanationBytes() { java.lang.Object ref = explanation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); explanation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COMMENT_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList comment_; /** * repeated string comment = 5; */ public com.google.protobuf.ProtocolStringList getCommentList() { return comment_; } /** * repeated string comment = 5; */ public int getCommentCount() { return comment_.size(); } /** * repeated string comment = 5; */ public java.lang.String getComment(int index) { return comment_.get(index); } /** * repeated string comment = 5; */ public com.google.protobuf.ByteString getCommentBytes(int index) { return comment_.getByteString(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, reason_); } for (int i = 0; i < prefix_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, prefix_.getRaw(i)); } for (int i = 0; i < regexp_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, regexp_.getRaw(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, explanation_); } for (int i = 0; i < comment_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, comment_.getRaw(i)); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, reason_); } { int dataSize = 0; for (int i = 0; i < prefix_.size(); i++) { dataSize += computeStringSizeNoTag(prefix_.getRaw(i)); } size += dataSize; size += 1 * getPrefixList().size(); } { int dataSize = 0; for (int i = 0; i < regexp_.size(); i++) { dataSize += computeStringSizeNoTag(regexp_.getRaw(i)); } size += dataSize; size += 1 * getRegexpList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, explanation_); } { int dataSize = 0; for (int i = 0; i < comment_.size(); i++) { dataSize += computeStringSizeNoTag(comment_.getRaw(i)); } size += dataSize; size += 1 * getCommentList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.javascript.jscomp.Requirement.WhitelistEntry)) { return super.equals(obj); } com.google.javascript.jscomp.Requirement.WhitelistEntry other = (com.google.javascript.jscomp.Requirement.WhitelistEntry) obj; boolean result = true; result = result && (hasReason() == other.hasReason()); if (hasReason()) { result = result && reason_ == other.reason_; } result = result && getPrefixList() .equals(other.getPrefixList()); result = result && getRegexpList() .equals(other.getRegexpList()); result = result && (hasExplanation() == other.hasExplanation()); if (hasExplanation()) { result = result && getExplanation() .equals(other.getExplanation()); } result = result && getCommentList() .equals(other.getCommentList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasReason()) { hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + reason_; } if (getPrefixCount() > 0) { hash = (37 * hash) + PREFIX_FIELD_NUMBER; hash = (53 * hash) + getPrefixList().hashCode(); } if (getRegexpCount() > 0) { hash = (37 * hash) + REGEXP_FIELD_NUMBER; hash = (53 * hash) + getRegexpList().hashCode(); } if (hasExplanation()) { hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; hash = (53 * hash) + getExplanation().hashCode(); } if (getCommentCount() > 0) { hash = (37 * hash) + COMMENT_FIELD_NUMBER; hash = (53 * hash) + getCommentList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.javascript.jscomp.Requirement.WhitelistEntry prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code jscomp.Requirement.WhitelistEntry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:jscomp.Requirement.WhitelistEntry) com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.javascript.jscomp.Requirement.WhitelistEntry.class, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder.class); } // Construct using com.google.javascript.jscomp.Requirement.WhitelistEntry.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); reason_ = 0; bitField0_ = (bitField0_ & ~0x00000001); prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); explanation_ = ""; bitField0_ = (bitField0_ & ~0x00000008); comment_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_descriptor; } public com.google.javascript.jscomp.Requirement.WhitelistEntry getDefaultInstanceForType() { return com.google.javascript.jscomp.Requirement.WhitelistEntry.getDefaultInstance(); } public com.google.javascript.jscomp.Requirement.WhitelistEntry build() { com.google.javascript.jscomp.Requirement.WhitelistEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.javascript.jscomp.Requirement.WhitelistEntry buildPartial() { com.google.javascript.jscomp.Requirement.WhitelistEntry result = new com.google.javascript.jscomp.Requirement.WhitelistEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.reason_ = reason_; if (((bitField0_ & 0x00000002) == 0x00000002)) { prefix_ = prefix_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.prefix_ = prefix_; if (((bitField0_ & 0x00000004) == 0x00000004)) { regexp_ = regexp_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.regexp_ = regexp_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000002; } result.explanation_ = explanation_; if (((bitField0_ & 0x00000010) == 0x00000010)) { comment_ = comment_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000010); } result.comment_ = comment_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.javascript.jscomp.Requirement.WhitelistEntry) { return mergeFrom((com.google.javascript.jscomp.Requirement.WhitelistEntry)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.javascript.jscomp.Requirement.WhitelistEntry other) { if (other == com.google.javascript.jscomp.Requirement.WhitelistEntry.getDefaultInstance()) return this; if (other.hasReason()) { setReason(other.getReason()); } if (!other.prefix_.isEmpty()) { if (prefix_.isEmpty()) { prefix_ = other.prefix_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensurePrefixIsMutable(); prefix_.addAll(other.prefix_); } onChanged(); } if (!other.regexp_.isEmpty()) { if (regexp_.isEmpty()) { regexp_ = other.regexp_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureRegexpIsMutable(); regexp_.addAll(other.regexp_); } onChanged(); } if (other.hasExplanation()) { bitField0_ |= 0x00000008; explanation_ = other.explanation_; onChanged(); } if (!other.comment_.isEmpty()) { if (comment_.isEmpty()) { comment_ = other.comment_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureCommentIsMutable(); comment_.addAll(other.comment_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.javascript.jscomp.Requirement.WhitelistEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.javascript.jscomp.Requirement.WhitelistEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int reason_ = 0; /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ public boolean hasReason() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason getReason() { com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason result = com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.valueOf(reason_); return result == null ? com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.UNSPECIFIED : result; } /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ public Builder setReason(com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; reason_ = value.getNumber(); onChanged(); return this; } /** * optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1; */ public Builder clearReason() { bitField0_ = (bitField0_ & ~0x00000001); reason_ = 0; onChanged(); return this; } private com.google.protobuf.LazyStringList prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensurePrefixIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { prefix_ = new com.google.protobuf.LazyStringArrayList(prefix_); bitField0_ |= 0x00000002; } } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public com.google.protobuf.ProtocolStringList getPrefixList() { return prefix_.getUnmodifiableView(); } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public int getPrefixCount() { return prefix_.size(); } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public java.lang.String getPrefix(int index) { return prefix_.get(index); } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public com.google.protobuf.ByteString getPrefixBytes(int index) { return prefix_.getByteString(index); } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public Builder setPrefix( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePrefixIsMutable(); prefix_.set(index, value); onChanged(); return this; } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public Builder addPrefix( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePrefixIsMutable(); prefix_.add(value); onChanged(); return this; } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public Builder addAllPrefix( java.lang.Iterable values) { ensurePrefixIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, prefix_); onChanged(); return this; } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public Builder clearPrefix() { prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * A list of source path prefixes.
       * 
* * repeated string prefix = 2; */ public Builder addPrefixBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensurePrefixIsMutable(); prefix_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureRegexpIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { regexp_ = new com.google.protobuf.LazyStringArrayList(regexp_); bitField0_ |= 0x00000004; } } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public com.google.protobuf.ProtocolStringList getRegexpList() { return regexp_.getUnmodifiableView(); } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public int getRegexpCount() { return regexp_.size(); } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public java.lang.String getRegexp(int index) { return regexp_.get(index); } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public com.google.protobuf.ByteString getRegexpBytes(int index) { return regexp_.getByteString(index); } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public Builder setRegexp( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRegexpIsMutable(); regexp_.set(index, value); onChanged(); return this; } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public Builder addRegexp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRegexpIsMutable(); regexp_.add(value); onChanged(); return this; } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public Builder addAllRegexp( java.lang.Iterable values) { ensureRegexpIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, regexp_); onChanged(); return this; } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public Builder clearRegexp() { regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
       * A list of regexes matching sources to be ignored
       * 
* * repeated string regexp = 3; */ public Builder addRegexpBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureRegexpIsMutable(); regexp_.add(value); onChanged(); return this; } private java.lang.Object explanation_ = ""; /** *
       * Short explanation.
       * 
* * optional string explanation = 4; */ public boolean hasExplanation() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** *
       * Short explanation.
       * 
* * optional string explanation = 4; */ public java.lang.String getExplanation() { java.lang.Object ref = explanation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { explanation_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * Short explanation.
       * 
* * optional string explanation = 4; */ public com.google.protobuf.ByteString getExplanationBytes() { java.lang.Object ref = explanation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); explanation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Short explanation.
       * 
* * optional string explanation = 4; */ public Builder setExplanation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; explanation_ = value; onChanged(); return this; } /** *
       * Short explanation.
       * 
* * optional string explanation = 4; */ public Builder clearExplanation() { bitField0_ = (bitField0_ & ~0x00000008); explanation_ = getDefaultInstance().getExplanation(); onChanged(); return this; } /** *
       * Short explanation.
       * 
* * optional string explanation = 4; */ public Builder setExplanationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; explanation_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList comment_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureCommentIsMutable() { if (!((bitField0_ & 0x00000010) == 0x00000010)) { comment_ = new com.google.protobuf.LazyStringArrayList(comment_); bitField0_ |= 0x00000010; } } /** * repeated string comment = 5; */ public com.google.protobuf.ProtocolStringList getCommentList() { return comment_.getUnmodifiableView(); } /** * repeated string comment = 5; */ public int getCommentCount() { return comment_.size(); } /** * repeated string comment = 5; */ public java.lang.String getComment(int index) { return comment_.get(index); } /** * repeated string comment = 5; */ public com.google.protobuf.ByteString getCommentBytes(int index) { return comment_.getByteString(index); } /** * repeated string comment = 5; */ public Builder setComment( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCommentIsMutable(); comment_.set(index, value); onChanged(); return this; } /** * repeated string comment = 5; */ public Builder addComment( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCommentIsMutable(); comment_.add(value); onChanged(); return this; } /** * repeated string comment = 5; */ public Builder addAllComment( java.lang.Iterable values) { ensureCommentIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, comment_); onChanged(); return this; } /** * repeated string comment = 5; */ public Builder clearComment() { comment_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * repeated string comment = 5; */ public Builder addCommentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureCommentIsMutable(); comment_.add(value); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:jscomp.Requirement.WhitelistEntry) } // @@protoc_insertion_point(class_scope:jscomp.Requirement.WhitelistEntry) private static final com.google.javascript.jscomp.Requirement.WhitelistEntry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.javascript.jscomp.Requirement.WhitelistEntry(); } public static com.google.javascript.jscomp.Requirement.WhitelistEntry getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public WhitelistEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WhitelistEntry(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.javascript.jscomp.Requirement.WhitelistEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int ERROR_MESSAGE_FIELD_NUMBER = 1; private volatile java.lang.Object errorMessage_; /** *
   * Required: The message to report when a requirement is violated. This should
   * reference a document describing the reasoning for the requirement
   * and contacts.
   * 
* * optional string error_message = 1; */ public boolean hasErrorMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** *
   * Required: The message to report when a requirement is violated. This should
   * reference a document describing the reasoning for the requirement
   * and contacts.
   * 
* * optional string error_message = 1; */ public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { errorMessage_ = s; } return s; } } /** *
   * Required: The message to report when a requirement is violated. This should
   * reference a document describing the reasoning for the requirement
   * and contacts.
   * 
* * optional string error_message = 1; */ public com.google.protobuf.ByteString getErrorMessageBytes() { java.lang.Object ref = errorMessage_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); errorMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int WHITELIST_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList whitelist_; /** *
   * Optional: A list of source path prefixes that are exempt from the
   * requirement.
   * 
* * repeated string whitelist = 2; */ public com.google.protobuf.ProtocolStringList getWhitelistList() { return whitelist_; } /** *
   * Optional: A list of source path prefixes that are exempt from the
   * requirement.
   * 
* * repeated string whitelist = 2; */ public int getWhitelistCount() { return whitelist_.size(); } /** *
   * Optional: A list of source path prefixes that are exempt from the
   * requirement.
   * 
* * repeated string whitelist = 2; */ public java.lang.String getWhitelist(int index) { return whitelist_.get(index); } /** *
   * Optional: A list of source path prefixes that are exempt from the
   * requirement.
   * 
* * repeated string whitelist = 2; */ public com.google.protobuf.ByteString getWhitelistBytes(int index) { return whitelist_.getByteString(index); } public static final int WHITELIST_REGEXP_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList whitelistRegexp_; /** *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
* * repeated string whitelist_regexp = 3; */ public com.google.protobuf.ProtocolStringList getWhitelistRegexpList() { return whitelistRegexp_; } /** *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
* * repeated string whitelist_regexp = 3; */ public int getWhitelistRegexpCount() { return whitelistRegexp_.size(); } /** *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
* * repeated string whitelist_regexp = 3; */ public java.lang.String getWhitelistRegexp(int index) { return whitelistRegexp_.get(index); } /** *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
* * repeated string whitelist_regexp = 3; */ public com.google.protobuf.ByteString getWhitelistRegexpBytes(int index) { return whitelistRegexp_.getByteString(index); } public static final int WHITELIST_ENTRY_FIELD_NUMBER = 14; private java.util.List whitelistEntry_; /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public java.util.List getWhitelistEntryList() { return whitelistEntry_; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public java.util.List getWhitelistEntryOrBuilderList() { return whitelistEntry_; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public int getWhitelistEntryCount() { return whitelistEntry_.size(); } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry getWhitelistEntry(int index) { return whitelistEntry_.get(index); } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder getWhitelistEntryOrBuilder( int index) { return whitelistEntry_.get(index); } public static final int ONLY_APPLY_TO_FIELD_NUMBER = 4; private com.google.protobuf.LazyStringList onlyApplyTo_; /** *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
* * repeated string only_apply_to = 4; */ public com.google.protobuf.ProtocolStringList getOnlyApplyToList() { return onlyApplyTo_; } /** *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
* * repeated string only_apply_to = 4; */ public int getOnlyApplyToCount() { return onlyApplyTo_.size(); } /** *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
* * repeated string only_apply_to = 4; */ public java.lang.String getOnlyApplyTo(int index) { return onlyApplyTo_.get(index); } /** *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
* * repeated string only_apply_to = 4; */ public com.google.protobuf.ByteString getOnlyApplyToBytes(int index) { return onlyApplyTo_.getByteString(index); } public static final int ONLY_APPLY_TO_REGEXP_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList onlyApplyToRegexp_; /** *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
* * repeated string only_apply_to_regexp = 5; */ public com.google.protobuf.ProtocolStringList getOnlyApplyToRegexpList() { return onlyApplyToRegexp_; } /** *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
* * repeated string only_apply_to_regexp = 5; */ public int getOnlyApplyToRegexpCount() { return onlyApplyToRegexp_.size(); } /** *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
* * repeated string only_apply_to_regexp = 5; */ public java.lang.String getOnlyApplyToRegexp(int index) { return onlyApplyToRegexp_.get(index); } /** *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
* * repeated string only_apply_to_regexp = 5; */ public com.google.protobuf.ByteString getOnlyApplyToRegexpBytes(int index) { return onlyApplyToRegexp_.getByteString(index); } public static final int TYPE_FIELD_NUMBER = 6; private int type_; /** *
   * Required: The type of requirement.
   * 
* * optional .jscomp.Requirement.Type type = 6; */ public boolean hasType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** *
   * Required: The type of requirement.
   * 
* * optional .jscomp.Requirement.Type type = 6; */ public com.google.javascript.jscomp.Requirement.Type getType() { com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_); return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result; } public static final int VALUE_FIELD_NUMBER = 7; private com.google.protobuf.LazyStringList value_; /** *
   * The value banned, optional for "custom" requirements.
   * 
* * repeated string value = 7; */ public com.google.protobuf.ProtocolStringList getValueList() { return value_; } /** *
   * The value banned, optional for "custom" requirements.
   * 
* * repeated string value = 7; */ public int getValueCount() { return value_.size(); } /** *
   * The value banned, optional for "custom" requirements.
   * 
* * repeated string value = 7; */ public java.lang.String getValue(int index) { return value_.get(index); } /** *
   * The value banned, optional for "custom" requirements.
   * 
* * repeated string value = 7; */ public com.google.protobuf.ByteString getValueBytes(int index) { return value_.getByteString(index); } public static final int TYPE_MATCHING_STRATEGY_FIELD_NUMBER = 13; private int typeMatchingStrategy_; /** *
   * Strategy to use for matching types in the value parameter (e.g. for
   * BANNED_CODE_PATTERN checks).
   * 
* * optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE]; */ public boolean hasTypeMatchingStrategy() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** *
   * Strategy to use for matching types in the value parameter (e.g. for
   * BANNED_CODE_PATTERN checks).
   * 
* * optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE]; */ public com.google.javascript.jscomp.Requirement.TypeMatchingStrategy getTypeMatchingStrategy() { com.google.javascript.jscomp.Requirement.TypeMatchingStrategy result = com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.valueOf(typeMatchingStrategy_); return result == null ? com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.LOOSE : result; } public static final int JAVA_CLASS_FIELD_NUMBER = 8; private volatile java.lang.Object javaClass_; /** *
   * For "custom" requirements, the Java class used to enforce the requirement.
   * Ignored otherwise.
   * 
* * optional string java_class = 8; */ public boolean hasJavaClass() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** *
   * For "custom" requirements, the Java class used to enforce the requirement.
   * Ignored otherwise.
   * 
* * optional string java_class = 8; */ public java.lang.String getJavaClass() { java.lang.Object ref = javaClass_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { javaClass_ = s; } return s; } } /** *
   * For "custom" requirements, the Java class used to enforce the requirement.
   * Ignored otherwise.
   * 
* * optional string java_class = 8; */ public com.google.protobuf.ByteString getJavaClassBytes() { java.lang.Object ref = javaClass_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); javaClass_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RULE_ID_FIELD_NUMBER = 9; private volatile java.lang.Object ruleId_; /** *
   * Gives the rule an unique ID that can be used for extending in other rules
   * through 'extends'. An example of ID is 'closure:innerHtml'.
   * 
* * optional string rule_id = 9; */ public boolean hasRuleId() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** *
   * Gives the rule an unique ID that can be used for extending in other rules
   * through 'extends'. An example of ID is 'closure:innerHtml'.
   * 
* * optional string rule_id = 9; */ public java.lang.String getRuleId() { java.lang.Object ref = ruleId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ruleId_ = s; } return s; } } /** *
   * Gives the rule an unique ID that can be used for extending in other rules
   * through 'extends'. An example of ID is 'closure:innerHtml'.
   * 
* * optional string rule_id = 9; */ public com.google.protobuf.ByteString getRuleIdBytes() { java.lang.Object ref = ruleId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); ruleId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int EXTENDS_FIELD_NUMBER = 10; private volatile java.lang.Object extends_; /** *
   * Allows extending whitelists of rules with the specified rule_id. If this
   * field is specified then all fields except whitelist, whitelist_regexp,
   * only_apply_to and only_apply_to_regexp are ignored.
   * 
* * optional string extends = 10; */ public boolean hasExtends() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** *
   * Allows extending whitelists of rules with the specified rule_id. If this
   * field is specified then all fields except whitelist, whitelist_regexp,
   * only_apply_to and only_apply_to_regexp are ignored.
   * 
* * optional string extends = 10; */ public java.lang.String getExtends() { java.lang.Object ref = extends_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { extends_ = s; } return s; } } /** *
   * Allows extending whitelists of rules with the specified rule_id. If this
   * field is specified then all fields except whitelist, whitelist_regexp,
   * only_apply_to and only_apply_to_regexp are ignored.
   * 
* * optional string extends = 10; */ public com.google.protobuf.ByteString getExtendsBytes() { java.lang.Object ref = extends_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); extends_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER = 11; private boolean reportLooseTypeViolations_; /** *
   * Whether to report possible violations when type information is not exact.
   * Normally, violations on parent types are reported as possible violations.
   * This field allows to ignore them and report only violations on exact types.
   * This changes the balance between the false positives and the false
   * negatives. With the default value, there might be lots of false positives
   * (possible violations) but there shouldn't be any false negatives. Without
   * reporting the loose type violations, there will be less false positives but
   * there can also be false negatives (an actual violation that is not
   * reported).
   * 
* * optional bool report_loose_type_violations = 11 [default = true]; */ public boolean hasReportLooseTypeViolations() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** *
   * Whether to report possible violations when type information is not exact.
   * Normally, violations on parent types are reported as possible violations.
   * This field allows to ignore them and report only violations on exact types.
   * This changes the balance between the false positives and the false
   * negatives. With the default value, there might be lots of false positives
   * (possible violations) but there shouldn't be any false negatives. Without
   * reporting the loose type violations, there will be less false positives but
   * there can also be false negatives (an actual violation that is not
   * reported).
   * 
* * optional bool report_loose_type_violations = 11 [default = true]; */ public boolean getReportLooseTypeViolations() { return reportLooseTypeViolations_; } public static final int SEVERITY_FIELD_NUMBER = 12; private int severity_; /** * optional .jscomp.Requirement.Severity severity = 12 [default = WARNING]; */ public boolean hasSeverity() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional .jscomp.Requirement.Severity severity = 12 [default = WARNING]; */ public com.google.javascript.jscomp.Requirement.Severity getSeverity() { com.google.javascript.jscomp.Requirement.Severity result = com.google.javascript.jscomp.Requirement.Severity.valueOf(severity_); return result == null ? com.google.javascript.jscomp.Requirement.Severity.WARNING : result; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3 .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) == 0x00000001)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, errorMessage_); } for (int i = 0; i < whitelist_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, whitelist_.getRaw(i)); } for (int i = 0; i < whitelistRegexp_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, whitelistRegexp_.getRaw(i)); } for (int i = 0; i < onlyApplyTo_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, onlyApplyTo_.getRaw(i)); } for (int i = 0; i < onlyApplyToRegexp_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, onlyApplyToRegexp_.getRaw(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(6, type_); } for (int i = 0; i < value_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, value_.getRaw(i)); } if (((bitField0_ & 0x00000008) == 0x00000008)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, javaClass_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, ruleId_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, extends_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBool(11, reportLooseTypeViolations_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeEnum(12, severity_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeEnum(13, typeMatchingStrategy_); } for (int i = 0; i < whitelistEntry_.size(); i++) { output.writeMessage(14, whitelistEntry_.get(i)); } extensionWriter.writeUntil(536870912, output); unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, errorMessage_); } { int dataSize = 0; for (int i = 0; i < whitelist_.size(); i++) { dataSize += computeStringSizeNoTag(whitelist_.getRaw(i)); } size += dataSize; size += 1 * getWhitelistList().size(); } { int dataSize = 0; for (int i = 0; i < whitelistRegexp_.size(); i++) { dataSize += computeStringSizeNoTag(whitelistRegexp_.getRaw(i)); } size += dataSize; size += 1 * getWhitelistRegexpList().size(); } { int dataSize = 0; for (int i = 0; i < onlyApplyTo_.size(); i++) { dataSize += computeStringSizeNoTag(onlyApplyTo_.getRaw(i)); } size += dataSize; size += 1 * getOnlyApplyToList().size(); } { int dataSize = 0; for (int i = 0; i < onlyApplyToRegexp_.size(); i++) { dataSize += computeStringSizeNoTag(onlyApplyToRegexp_.getRaw(i)); } size += dataSize; size += 1 * getOnlyApplyToRegexpList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, type_); } { int dataSize = 0; for (int i = 0; i < value_.size(); i++) { dataSize += computeStringSizeNoTag(value_.getRaw(i)); } size += dataSize; size += 1 * getValueList().size(); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, javaClass_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, ruleId_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, extends_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(11, reportLooseTypeViolations_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(12, severity_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(13, typeMatchingStrategy_); } for (int i = 0; i < whitelistEntry_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(14, whitelistEntry_.get(i)); } size += extensionsSerializedSize(); size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.javascript.jscomp.Requirement)) { return super.equals(obj); } com.google.javascript.jscomp.Requirement other = (com.google.javascript.jscomp.Requirement) obj; boolean result = true; result = result && (hasErrorMessage() == other.hasErrorMessage()); if (hasErrorMessage()) { result = result && getErrorMessage() .equals(other.getErrorMessage()); } result = result && getWhitelistList() .equals(other.getWhitelistList()); result = result && getWhitelistRegexpList() .equals(other.getWhitelistRegexpList()); result = result && getWhitelistEntryList() .equals(other.getWhitelistEntryList()); result = result && getOnlyApplyToList() .equals(other.getOnlyApplyToList()); result = result && getOnlyApplyToRegexpList() .equals(other.getOnlyApplyToRegexpList()); result = result && (hasType() == other.hasType()); if (hasType()) { result = result && type_ == other.type_; } result = result && getValueList() .equals(other.getValueList()); result = result && (hasTypeMatchingStrategy() == other.hasTypeMatchingStrategy()); if (hasTypeMatchingStrategy()) { result = result && typeMatchingStrategy_ == other.typeMatchingStrategy_; } result = result && (hasJavaClass() == other.hasJavaClass()); if (hasJavaClass()) { result = result && getJavaClass() .equals(other.getJavaClass()); } result = result && (hasRuleId() == other.hasRuleId()); if (hasRuleId()) { result = result && getRuleId() .equals(other.getRuleId()); } result = result && (hasExtends() == other.hasExtends()); if (hasExtends()) { result = result && getExtends() .equals(other.getExtends()); } result = result && (hasReportLooseTypeViolations() == other.hasReportLooseTypeViolations()); if (hasReportLooseTypeViolations()) { result = result && (getReportLooseTypeViolations() == other.getReportLooseTypeViolations()); } result = result && (hasSeverity() == other.hasSeverity()); if (hasSeverity()) { result = result && severity_ == other.severity_; } result = result && unknownFields.equals(other.unknownFields); result = result && getExtensionFields().equals(other.getExtensionFields()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasErrorMessage()) { hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getErrorMessage().hashCode(); } if (getWhitelistCount() > 0) { hash = (37 * hash) + WHITELIST_FIELD_NUMBER; hash = (53 * hash) + getWhitelistList().hashCode(); } if (getWhitelistRegexpCount() > 0) { hash = (37 * hash) + WHITELIST_REGEXP_FIELD_NUMBER; hash = (53 * hash) + getWhitelistRegexpList().hashCode(); } if (getWhitelistEntryCount() > 0) { hash = (37 * hash) + WHITELIST_ENTRY_FIELD_NUMBER; hash = (53 * hash) + getWhitelistEntryList().hashCode(); } if (getOnlyApplyToCount() > 0) { hash = (37 * hash) + ONLY_APPLY_TO_FIELD_NUMBER; hash = (53 * hash) + getOnlyApplyToList().hashCode(); } if (getOnlyApplyToRegexpCount() > 0) { hash = (37 * hash) + ONLY_APPLY_TO_REGEXP_FIELD_NUMBER; hash = (53 * hash) + getOnlyApplyToRegexpList().hashCode(); } if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; } if (getValueCount() > 0) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValueList().hashCode(); } if (hasTypeMatchingStrategy()) { hash = (37 * hash) + TYPE_MATCHING_STRATEGY_FIELD_NUMBER; hash = (53 * hash) + typeMatchingStrategy_; } if (hasJavaClass()) { hash = (37 * hash) + JAVA_CLASS_FIELD_NUMBER; hash = (53 * hash) + getJavaClass().hashCode(); } if (hasRuleId()) { hash = (37 * hash) + RULE_ID_FIELD_NUMBER; hash = (53 * hash) + getRuleId().hashCode(); } if (hasExtends()) { hash = (37 * hash) + EXTENDS_FIELD_NUMBER; hash = (53 * hash) + getExtends().hashCode(); } if (hasReportLooseTypeViolations()) { hash = (37 * hash) + REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getReportLooseTypeViolations()); } if (hasSeverity()) { hash = (37 * hash) + SEVERITY_FIELD_NUMBER; hash = (53 * hash) + severity_; } hash = hashFields(hash, getExtensionFields()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.javascript.jscomp.Requirement parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.javascript.jscomp.Requirement parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.javascript.jscomp.Requirement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.javascript.jscomp.Requirement parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.javascript.jscomp.Requirement parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.javascript.jscomp.Requirement parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.javascript.jscomp.Requirement parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.javascript.jscomp.Requirement parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.javascript.jscomp.Requirement parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.javascript.jscomp.Requirement parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.javascript.jscomp.Requirement prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A specification of code requirements
   * NEXT ID: 15
   * 
* * Protobuf type {@code jscomp.Requirement} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< com.google.javascript.jscomp.Requirement, Builder> implements // @@protoc_insertion_point(builder_implements:jscomp.Requirement) com.google.javascript.jscomp.RequirementOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.javascript.jscomp.Requirement.class, com.google.javascript.jscomp.Requirement.Builder.class); } // Construct using com.google.javascript.jscomp.Requirement.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getWhitelistEntryFieldBuilder(); } } public Builder clear() { super.clear(); errorMessage_ = ""; bitField0_ = (bitField0_ & ~0x00000001); whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); if (whitelistEntryBuilder_ == null) { whitelistEntry_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { whitelistEntryBuilder_.clear(); } onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); type_ = 1; bitField0_ = (bitField0_ & ~0x00000040); value_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000080); typeMatchingStrategy_ = 1; bitField0_ = (bitField0_ & ~0x00000100); javaClass_ = ""; bitField0_ = (bitField0_ & ~0x00000200); ruleId_ = ""; bitField0_ = (bitField0_ & ~0x00000400); extends_ = ""; bitField0_ = (bitField0_ & ~0x00000800); reportLooseTypeViolations_ = true; bitField0_ = (bitField0_ & ~0x00001000); severity_ = 1; bitField0_ = (bitField0_ & ~0x00002000); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_descriptor; } public com.google.javascript.jscomp.Requirement getDefaultInstanceForType() { return com.google.javascript.jscomp.Requirement.getDefaultInstance(); } public com.google.javascript.jscomp.Requirement build() { com.google.javascript.jscomp.Requirement result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.javascript.jscomp.Requirement buildPartial() { com.google.javascript.jscomp.Requirement result = new com.google.javascript.jscomp.Requirement(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.errorMessage_ = errorMessage_; if (((bitField0_ & 0x00000002) == 0x00000002)) { whitelist_ = whitelist_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.whitelist_ = whitelist_; if (((bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = whitelistRegexp_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.whitelistRegexp_ = whitelistRegexp_; if (whitelistEntryBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008)) { whitelistEntry_ = java.util.Collections.unmodifiableList(whitelistEntry_); bitField0_ = (bitField0_ & ~0x00000008); } result.whitelistEntry_ = whitelistEntry_; } else { result.whitelistEntry_ = whitelistEntryBuilder_.build(); } if (((bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyTo_ = onlyApplyTo_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000010); } result.onlyApplyTo_ = onlyApplyTo_; if (((bitField0_ & 0x00000020) == 0x00000020)) { onlyApplyToRegexp_ = onlyApplyToRegexp_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000020); } result.onlyApplyToRegexp_ = onlyApplyToRegexp_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000002; } result.type_ = type_; if (((bitField0_ & 0x00000080) == 0x00000080)) { value_ = value_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000080); } result.value_ = value_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000004; } result.typeMatchingStrategy_ = typeMatchingStrategy_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000008; } result.javaClass_ = javaClass_; if (((from_bitField0_ & 0x00000400) == 0x00000400)) { to_bitField0_ |= 0x00000010; } result.ruleId_ = ruleId_; if (((from_bitField0_ & 0x00000800) == 0x00000800)) { to_bitField0_ |= 0x00000020; } result.extends_ = extends_; if (((from_bitField0_ & 0x00001000) == 0x00001000)) { to_bitField0_ |= 0x00000040; } result.reportLooseTypeViolations_ = reportLooseTypeViolations_; if (((from_bitField0_ & 0x00002000) == 0x00002000)) { to_bitField0_ |= 0x00000080; } result.severity_ = severity_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder setExtension( com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.javascript.jscomp.Requirement, Type> extension, Type value) { return (Builder) super.setExtension(extension, value); } public Builder setExtension( com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.javascript.jscomp.Requirement, java.util.List> extension, int index, Type value) { return (Builder) super.setExtension(extension, index, value); } public Builder addExtension( com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.javascript.jscomp.Requirement, java.util.List> extension, Type value) { return (Builder) super.addExtension(extension, value); } public Builder clearExtension( com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.javascript.jscomp.Requirement, ?> extension) { return (Builder) super.clearExtension(extension); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.javascript.jscomp.Requirement) { return mergeFrom((com.google.javascript.jscomp.Requirement)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.javascript.jscomp.Requirement other) { if (other == com.google.javascript.jscomp.Requirement.getDefaultInstance()) return this; if (other.hasErrorMessage()) { bitField0_ |= 0x00000001; errorMessage_ = other.errorMessage_; onChanged(); } if (!other.whitelist_.isEmpty()) { if (whitelist_.isEmpty()) { whitelist_ = other.whitelist_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureWhitelistIsMutable(); whitelist_.addAll(other.whitelist_); } onChanged(); } if (!other.whitelistRegexp_.isEmpty()) { if (whitelistRegexp_.isEmpty()) { whitelistRegexp_ = other.whitelistRegexp_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureWhitelistRegexpIsMutable(); whitelistRegexp_.addAll(other.whitelistRegexp_); } onChanged(); } if (whitelistEntryBuilder_ == null) { if (!other.whitelistEntry_.isEmpty()) { if (whitelistEntry_.isEmpty()) { whitelistEntry_ = other.whitelistEntry_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureWhitelistEntryIsMutable(); whitelistEntry_.addAll(other.whitelistEntry_); } onChanged(); } } else { if (!other.whitelistEntry_.isEmpty()) { if (whitelistEntryBuilder_.isEmpty()) { whitelistEntryBuilder_.dispose(); whitelistEntryBuilder_ = null; whitelistEntry_ = other.whitelistEntry_; bitField0_ = (bitField0_ & ~0x00000008); whitelistEntryBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWhitelistEntryFieldBuilder() : null; } else { whitelistEntryBuilder_.addAllMessages(other.whitelistEntry_); } } } if (!other.onlyApplyTo_.isEmpty()) { if (onlyApplyTo_.isEmpty()) { onlyApplyTo_ = other.onlyApplyTo_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureOnlyApplyToIsMutable(); onlyApplyTo_.addAll(other.onlyApplyTo_); } onChanged(); } if (!other.onlyApplyToRegexp_.isEmpty()) { if (onlyApplyToRegexp_.isEmpty()) { onlyApplyToRegexp_ = other.onlyApplyToRegexp_; bitField0_ = (bitField0_ & ~0x00000020); } else { ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.addAll(other.onlyApplyToRegexp_); } onChanged(); } if (other.hasType()) { setType(other.getType()); } if (!other.value_.isEmpty()) { if (value_.isEmpty()) { value_ = other.value_; bitField0_ = (bitField0_ & ~0x00000080); } else { ensureValueIsMutable(); value_.addAll(other.value_); } onChanged(); } if (other.hasTypeMatchingStrategy()) { setTypeMatchingStrategy(other.getTypeMatchingStrategy()); } if (other.hasJavaClass()) { bitField0_ |= 0x00000200; javaClass_ = other.javaClass_; onChanged(); } if (other.hasRuleId()) { bitField0_ |= 0x00000400; ruleId_ = other.ruleId_; onChanged(); } if (other.hasExtends()) { bitField0_ |= 0x00000800; extends_ = other.extends_; onChanged(); } if (other.hasReportLooseTypeViolations()) { setReportLooseTypeViolations(other.getReportLooseTypeViolations()); } if (other.hasSeverity()) { setSeverity(other.getSeverity()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { if (!extensionsAreInitialized()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.javascript.jscomp.Requirement parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.javascript.jscomp.Requirement) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object errorMessage_ = ""; /** *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
* * optional string error_message = 1; */ public boolean hasErrorMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
* * optional string error_message = 1; */ public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { errorMessage_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
* * optional string error_message = 1; */ public com.google.protobuf.ByteString getErrorMessageBytes() { java.lang.Object ref = errorMessage_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); errorMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
* * optional string error_message = 1; */ public Builder setErrorMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; errorMessage_ = value; onChanged(); return this; } /** *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
* * optional string error_message = 1; */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000001); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /** *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
* * optional string error_message = 1; */ public Builder setErrorMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; errorMessage_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureWhitelistIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { whitelist_ = new com.google.protobuf.LazyStringArrayList(whitelist_); bitField0_ |= 0x00000002; } } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public com.google.protobuf.ProtocolStringList getWhitelistList() { return whitelist_.getUnmodifiableView(); } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public int getWhitelistCount() { return whitelist_.size(); } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public java.lang.String getWhitelist(int index) { return whitelist_.get(index); } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public com.google.protobuf.ByteString getWhitelistBytes(int index) { return whitelist_.getByteString(index); } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public Builder setWhitelist( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistIsMutable(); whitelist_.set(index, value); onChanged(); return this; } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public Builder addWhitelist( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistIsMutable(); whitelist_.add(value); onChanged(); return this; } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public Builder addAllWhitelist( java.lang.Iterable values) { ensureWhitelistIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, whitelist_); onChanged(); return this; } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public Builder clearWhitelist() { whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * Optional: A list of source path prefixes that are exempt from the
     * requirement.
     * 
* * repeated string whitelist = 2; */ public Builder addWhitelistBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistIsMutable(); whitelist_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureWhitelistRegexpIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = new com.google.protobuf.LazyStringArrayList(whitelistRegexp_); bitField0_ |= 0x00000004; } } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public com.google.protobuf.ProtocolStringList getWhitelistRegexpList() { return whitelistRegexp_.getUnmodifiableView(); } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public int getWhitelistRegexpCount() { return whitelistRegexp_.size(); } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public java.lang.String getWhitelistRegexp(int index) { return whitelistRegexp_.get(index); } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public com.google.protobuf.ByteString getWhitelistRegexpBytes(int index) { return whitelistRegexp_.getByteString(index); } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public Builder setWhitelistRegexp( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistRegexpIsMutable(); whitelistRegexp_.set(index, value); onChanged(); return this; } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public Builder addWhitelistRegexp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistRegexpIsMutable(); whitelistRegexp_.add(value); onChanged(); return this; } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public Builder addAllWhitelistRegexp( java.lang.Iterable values) { ensureWhitelistRegexpIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, whitelistRegexp_); onChanged(); return this; } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public Builder clearWhitelistRegexp() { whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
* * repeated string whitelist_regexp = 3; */ public Builder addWhitelistRegexpBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistRegexpIsMutable(); whitelistRegexp_.add(value); onChanged(); return this; } private java.util.List whitelistEntry_ = java.util.Collections.emptyList(); private void ensureWhitelistEntryIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { whitelistEntry_ = new java.util.ArrayList(whitelistEntry_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.javascript.jscomp.Requirement.WhitelistEntry, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder, com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder> whitelistEntryBuilder_; /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public java.util.List getWhitelistEntryList() { if (whitelistEntryBuilder_ == null) { return java.util.Collections.unmodifiableList(whitelistEntry_); } else { return whitelistEntryBuilder_.getMessageList(); } } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public int getWhitelistEntryCount() { if (whitelistEntryBuilder_ == null) { return whitelistEntry_.size(); } else { return whitelistEntryBuilder_.getCount(); } } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry getWhitelistEntry(int index) { if (whitelistEntryBuilder_ == null) { return whitelistEntry_.get(index); } else { return whitelistEntryBuilder_.getMessage(index); } } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder setWhitelistEntry( int index, com.google.javascript.jscomp.Requirement.WhitelistEntry value) { if (whitelistEntryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWhitelistEntryIsMutable(); whitelistEntry_.set(index, value); onChanged(); } else { whitelistEntryBuilder_.setMessage(index, value); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder setWhitelistEntry( int index, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder builderForValue) { if (whitelistEntryBuilder_ == null) { ensureWhitelistEntryIsMutable(); whitelistEntry_.set(index, builderForValue.build()); onChanged(); } else { whitelistEntryBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder addWhitelistEntry(com.google.javascript.jscomp.Requirement.WhitelistEntry value) { if (whitelistEntryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWhitelistEntryIsMutable(); whitelistEntry_.add(value); onChanged(); } else { whitelistEntryBuilder_.addMessage(value); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder addWhitelistEntry( int index, com.google.javascript.jscomp.Requirement.WhitelistEntry value) { if (whitelistEntryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWhitelistEntryIsMutable(); whitelistEntry_.add(index, value); onChanged(); } else { whitelistEntryBuilder_.addMessage(index, value); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder addWhitelistEntry( com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder builderForValue) { if (whitelistEntryBuilder_ == null) { ensureWhitelistEntryIsMutable(); whitelistEntry_.add(builderForValue.build()); onChanged(); } else { whitelistEntryBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder addWhitelistEntry( int index, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder builderForValue) { if (whitelistEntryBuilder_ == null) { ensureWhitelistEntryIsMutable(); whitelistEntry_.add(index, builderForValue.build()); onChanged(); } else { whitelistEntryBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder addAllWhitelistEntry( java.lang.Iterable values) { if (whitelistEntryBuilder_ == null) { ensureWhitelistEntryIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, whitelistEntry_); onChanged(); } else { whitelistEntryBuilder_.addAllMessages(values); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder clearWhitelistEntry() { if (whitelistEntryBuilder_ == null) { whitelistEntry_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { whitelistEntryBuilder_.clear(); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public Builder removeWhitelistEntry(int index) { if (whitelistEntryBuilder_ == null) { ensureWhitelistEntryIsMutable(); whitelistEntry_.remove(index); onChanged(); } else { whitelistEntryBuilder_.remove(index); } return this; } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder getWhitelistEntryBuilder( int index) { return getWhitelistEntryFieldBuilder().getBuilder(index); } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder getWhitelistEntryOrBuilder( int index) { if (whitelistEntryBuilder_ == null) { return whitelistEntry_.get(index); } else { return whitelistEntryBuilder_.getMessageOrBuilder(index); } } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public java.util.List getWhitelistEntryOrBuilderList() { if (whitelistEntryBuilder_ != null) { return whitelistEntryBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(whitelistEntry_); } } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder addWhitelistEntryBuilder() { return getWhitelistEntryFieldBuilder().addBuilder( com.google.javascript.jscomp.Requirement.WhitelistEntry.getDefaultInstance()); } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder addWhitelistEntryBuilder( int index) { return getWhitelistEntryFieldBuilder().addBuilder( index, com.google.javascript.jscomp.Requirement.WhitelistEntry.getDefaultInstance()); } /** * repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14; */ public java.util.List getWhitelistEntryBuilderList() { return getWhitelistEntryFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.javascript.jscomp.Requirement.WhitelistEntry, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder, com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder> getWhitelistEntryFieldBuilder() { if (whitelistEntryBuilder_ == null) { whitelistEntryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.javascript.jscomp.Requirement.WhitelistEntry, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder, com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder>( whitelistEntry_, ((bitField0_ & 0x00000008) == 0x00000008), getParentForChildren(), isClean()); whitelistEntry_ = null; } return whitelistEntryBuilder_; } private com.google.protobuf.LazyStringList onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureOnlyApplyToIsMutable() { if (!((bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyTo_ = new com.google.protobuf.LazyStringArrayList(onlyApplyTo_); bitField0_ |= 0x00000010; } } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public com.google.protobuf.ProtocolStringList getOnlyApplyToList() { return onlyApplyTo_.getUnmodifiableView(); } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public int getOnlyApplyToCount() { return onlyApplyTo_.size(); } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public java.lang.String getOnlyApplyTo(int index) { return onlyApplyTo_.get(index); } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public com.google.protobuf.ByteString getOnlyApplyToBytes(int index) { return onlyApplyTo_.getByteString(index); } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public Builder setOnlyApplyTo( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToIsMutable(); onlyApplyTo_.set(index, value); onChanged(); return this; } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public Builder addOnlyApplyTo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToIsMutable(); onlyApplyTo_.add(value); onChanged(); return this; } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public Builder addAllOnlyApplyTo( java.lang.Iterable values) { ensureOnlyApplyToIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, onlyApplyTo_); onChanged(); return this; } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public Builder clearOnlyApplyTo() { onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
* * repeated string only_apply_to = 4; */ public Builder addOnlyApplyToBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToIsMutable(); onlyApplyTo_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureOnlyApplyToRegexpIsMutable() { if (!((bitField0_ & 0x00000020) == 0x00000020)) { onlyApplyToRegexp_ = new com.google.protobuf.LazyStringArrayList(onlyApplyToRegexp_); bitField0_ |= 0x00000020; } } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public com.google.protobuf.ProtocolStringList getOnlyApplyToRegexpList() { return onlyApplyToRegexp_.getUnmodifiableView(); } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public int getOnlyApplyToRegexpCount() { return onlyApplyToRegexp_.size(); } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public java.lang.String getOnlyApplyToRegexp(int index) { return onlyApplyToRegexp_.get(index); } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public com.google.protobuf.ByteString getOnlyApplyToRegexpBytes(int index) { return onlyApplyToRegexp_.getByteString(index); } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public Builder setOnlyApplyToRegexp( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.set(index, value); onChanged(); return this; } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public Builder addOnlyApplyToRegexp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.add(value); onChanged(); return this; } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public Builder addAllOnlyApplyToRegexp( java.lang.Iterable values) { ensureOnlyApplyToRegexpIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, onlyApplyToRegexp_); onChanged(); return this; } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public Builder clearOnlyApplyToRegexp() { onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
* * repeated string only_apply_to_regexp = 5; */ public Builder addOnlyApplyToRegexpBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.add(value); onChanged(); return this; } private int type_ = 1; /** *
     * Required: The type of requirement.
     * 
* * optional .jscomp.Requirement.Type type = 6; */ public boolean hasType() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** *
     * Required: The type of requirement.
     * 
* * optional .jscomp.Requirement.Type type = 6; */ public com.google.javascript.jscomp.Requirement.Type getType() { com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_); return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result; } /** *
     * Required: The type of requirement.
     * 
* * optional .jscomp.Requirement.Type type = 6; */ public Builder setType(com.google.javascript.jscomp.Requirement.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; type_ = value.getNumber(); onChanged(); return this; } /** *
     * Required: The type of requirement.
     * 
* * optional .jscomp.Requirement.Type type = 6; */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000040); type_ = 1; onChanged(); return this; } private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureValueIsMutable() { if (!((bitField0_ & 0x00000080) == 0x00000080)) { value_ = new com.google.protobuf.LazyStringArrayList(value_); bitField0_ |= 0x00000080; } } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public com.google.protobuf.ProtocolStringList getValueList() { return value_.getUnmodifiableView(); } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public int getValueCount() { return value_.size(); } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public java.lang.String getValue(int index) { return value_.get(index); } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public com.google.protobuf.ByteString getValueBytes(int index) { return value_.getByteString(index); } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public Builder setValue( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureValueIsMutable(); value_.set(index, value); onChanged(); return this; } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public Builder addValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureValueIsMutable(); value_.add(value); onChanged(); return this; } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public Builder addAllValue( java.lang.Iterable values) { ensureValueIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, value_); onChanged(); return this; } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public Builder clearValue() { value_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** *
     * The value banned, optional for "custom" requirements.
     * 
* * repeated string value = 7; */ public Builder addValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureValueIsMutable(); value_.add(value); onChanged(); return this; } private int typeMatchingStrategy_ = 1; /** *
     * Strategy to use for matching types in the value parameter (e.g. for
     * BANNED_CODE_PATTERN checks).
     * 
* * optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE]; */ public boolean hasTypeMatchingStrategy() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** *
     * Strategy to use for matching types in the value parameter (e.g. for
     * BANNED_CODE_PATTERN checks).
     * 
* * optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE]; */ public com.google.javascript.jscomp.Requirement.TypeMatchingStrategy getTypeMatchingStrategy() { com.google.javascript.jscomp.Requirement.TypeMatchingStrategy result = com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.valueOf(typeMatchingStrategy_); return result == null ? com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.LOOSE : result; } /** *
     * Strategy to use for matching types in the value parameter (e.g. for
     * BANNED_CODE_PATTERN checks).
     * 
* * optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE]; */ public Builder setTypeMatchingStrategy(com.google.javascript.jscomp.Requirement.TypeMatchingStrategy value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; typeMatchingStrategy_ = value.getNumber(); onChanged(); return this; } /** *
     * Strategy to use for matching types in the value parameter (e.g. for
     * BANNED_CODE_PATTERN checks).
     * 
* * optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE]; */ public Builder clearTypeMatchingStrategy() { bitField0_ = (bitField0_ & ~0x00000100); typeMatchingStrategy_ = 1; onChanged(); return this; } private java.lang.Object javaClass_ = ""; /** *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
* * optional string java_class = 8; */ public boolean hasJavaClass() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
* * optional string java_class = 8; */ public java.lang.String getJavaClass() { java.lang.Object ref = javaClass_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { javaClass_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
* * optional string java_class = 8; */ public com.google.protobuf.ByteString getJavaClassBytes() { java.lang.Object ref = javaClass_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); javaClass_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
* * optional string java_class = 8; */ public Builder setJavaClass( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; javaClass_ = value; onChanged(); return this; } /** *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
* * optional string java_class = 8; */ public Builder clearJavaClass() { bitField0_ = (bitField0_ & ~0x00000200); javaClass_ = getDefaultInstance().getJavaClass(); onChanged(); return this; } /** *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
* * optional string java_class = 8; */ public Builder setJavaClassBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; javaClass_ = value; onChanged(); return this; } private java.lang.Object ruleId_ = ""; /** *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
* * optional string rule_id = 9; */ public boolean hasRuleId() { return ((bitField0_ & 0x00000400) == 0x00000400); } /** *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
* * optional string rule_id = 9; */ public java.lang.String getRuleId() { java.lang.Object ref = ruleId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ruleId_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
* * optional string rule_id = 9; */ public com.google.protobuf.ByteString getRuleIdBytes() { java.lang.Object ref = ruleId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); ruleId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
* * optional string rule_id = 9; */ public Builder setRuleId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000400; ruleId_ = value; onChanged(); return this; } /** *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
* * optional string rule_id = 9; */ public Builder clearRuleId() { bitField0_ = (bitField0_ & ~0x00000400); ruleId_ = getDefaultInstance().getRuleId(); onChanged(); return this; } /** *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
* * optional string rule_id = 9; */ public Builder setRuleIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000400; ruleId_ = value; onChanged(); return this; } private java.lang.Object extends_ = ""; /** *
     * Allows extending whitelists of rules with the specified rule_id. If this
     * field is specified then all fields except whitelist, whitelist_regexp,
     * only_apply_to and only_apply_to_regexp are ignored.
     * 
* * optional string extends = 10; */ public boolean hasExtends() { return ((bitField0_ & 0x00000800) == 0x00000800); } /** *
     * Allows extending whitelists of rules with the specified rule_id. If this
     * field is specified then all fields except whitelist, whitelist_regexp,
     * only_apply_to and only_apply_to_regexp are ignored.
     * 
* * optional string extends = 10; */ public java.lang.String getExtends() { java.lang.Object ref = extends_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { extends_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Allows extending whitelists of rules with the specified rule_id. If this
     * field is specified then all fields except whitelist, whitelist_regexp,
     * only_apply_to and only_apply_to_regexp are ignored.
     * 
* * optional string extends = 10; */ public com.google.protobuf.ByteString getExtendsBytes() { java.lang.Object ref = extends_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); extends_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Allows extending whitelists of rules with the specified rule_id. If this
     * field is specified then all fields except whitelist, whitelist_regexp,
     * only_apply_to and only_apply_to_regexp are ignored.
     * 
* * optional string extends = 10; */ public Builder setExtends( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000800; extends_ = value; onChanged(); return this; } /** *
     * Allows extending whitelists of rules with the specified rule_id. If this
     * field is specified then all fields except whitelist, whitelist_regexp,
     * only_apply_to and only_apply_to_regexp are ignored.
     * 
* * optional string extends = 10; */ public Builder clearExtends() { bitField0_ = (bitField0_ & ~0x00000800); extends_ = getDefaultInstance().getExtends(); onChanged(); return this; } /** *
     * Allows extending whitelists of rules with the specified rule_id. If this
     * field is specified then all fields except whitelist, whitelist_regexp,
     * only_apply_to and only_apply_to_regexp are ignored.
     * 
* * optional string extends = 10; */ public Builder setExtendsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000800; extends_ = value; onChanged(); return this; } private boolean reportLooseTypeViolations_ = true; /** *
     * Whether to report possible violations when type information is not exact.
     * Normally, violations on parent types are reported as possible violations.
     * This field allows to ignore them and report only violations on exact types.
     * This changes the balance between the false positives and the false
     * negatives. With the default value, there might be lots of false positives
     * (possible violations) but there shouldn't be any false negatives. Without
     * reporting the loose type violations, there will be less false positives but
     * there can also be false negatives (an actual violation that is not
     * reported).
     * 
* * optional bool report_loose_type_violations = 11 [default = true]; */ public boolean hasReportLooseTypeViolations() { return ((bitField0_ & 0x00001000) == 0x00001000); } /** *
     * Whether to report possible violations when type information is not exact.
     * Normally, violations on parent types are reported as possible violations.
     * This field allows to ignore them and report only violations on exact types.
     * This changes the balance between the false positives and the false
     * negatives. With the default value, there might be lots of false positives
     * (possible violations) but there shouldn't be any false negatives. Without
     * reporting the loose type violations, there will be less false positives but
     * there can also be false negatives (an actual violation that is not
     * reported).
     * 
* * optional bool report_loose_type_violations = 11 [default = true]; */ public boolean getReportLooseTypeViolations() { return reportLooseTypeViolations_; } /** *
     * Whether to report possible violations when type information is not exact.
     * Normally, violations on parent types are reported as possible violations.
     * This field allows to ignore them and report only violations on exact types.
     * This changes the balance between the false positives and the false
     * negatives. With the default value, there might be lots of false positives
     * (possible violations) but there shouldn't be any false negatives. Without
     * reporting the loose type violations, there will be less false positives but
     * there can also be false negatives (an actual violation that is not
     * reported).
     * 
* * optional bool report_loose_type_violations = 11 [default = true]; */ public Builder setReportLooseTypeViolations(boolean value) { bitField0_ |= 0x00001000; reportLooseTypeViolations_ = value; onChanged(); return this; } /** *
     * Whether to report possible violations when type information is not exact.
     * Normally, violations on parent types are reported as possible violations.
     * This field allows to ignore them and report only violations on exact types.
     * This changes the balance between the false positives and the false
     * negatives. With the default value, there might be lots of false positives
     * (possible violations) but there shouldn't be any false negatives. Without
     * reporting the loose type violations, there will be less false positives but
     * there can also be false negatives (an actual violation that is not
     * reported).
     * 
* * optional bool report_loose_type_violations = 11 [default = true]; */ public Builder clearReportLooseTypeViolations() { bitField0_ = (bitField0_ & ~0x00001000); reportLooseTypeViolations_ = true; onChanged(); return this; } private int severity_ = 1; /** * optional .jscomp.Requirement.Severity severity = 12 [default = WARNING]; */ public boolean hasSeverity() { return ((bitField0_ & 0x00002000) == 0x00002000); } /** * optional .jscomp.Requirement.Severity severity = 12 [default = WARNING]; */ public com.google.javascript.jscomp.Requirement.Severity getSeverity() { com.google.javascript.jscomp.Requirement.Severity result = com.google.javascript.jscomp.Requirement.Severity.valueOf(severity_); return result == null ? com.google.javascript.jscomp.Requirement.Severity.WARNING : result; } /** * optional .jscomp.Requirement.Severity severity = 12 [default = WARNING]; */ public Builder setSeverity(com.google.javascript.jscomp.Requirement.Severity value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00002000; severity_ = value.getNumber(); onChanged(); return this; } /** * optional .jscomp.Requirement.Severity severity = 12 [default = WARNING]; */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00002000); severity_ = 1; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:jscomp.Requirement) } // @@protoc_insertion_point(class_scope:jscomp.Requirement) private static final com.google.javascript.jscomp.Requirement DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.javascript.jscomp.Requirement(); } public static com.google.javascript.jscomp.Requirement getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Requirement parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Requirement(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.javascript.jscomp.Requirement getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy