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.

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

package com.google.javascript.jscomp;

/**
 * Protobuf type {@code jscomp.Requirement}
 *
 * 
 * A specification of code requirements
 * 
*/ public final class Requirement extends com.google.protobuf.GeneratedMessage.ExtendableMessage< Requirement> implements RequirementOrBuilder { // Use Requirement.newBuilder() to construct. private Requirement(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Requirement(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Requirement defaultInstance; public static Requirement getDefaultInstance() { return defaultInstance; } public Requirement getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @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 { initFields(); 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: { bitField0_ |= 0x00000001; errorMessage_ = input.readBytes(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { whitelist_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } whitelist_.add(input.readBytes()); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } whitelistRegexp_.add(input.readBytes()); break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { onlyApplyTo_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000008; } onlyApplyTo_.add(input.readBytes()); break; } case 42: { if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyToRegexp_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000010; } onlyApplyToRegexp_.add(input.readBytes()); 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_ = value; } break; } case 58: { if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { value_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000040; } value_.add(input.readBytes()); break; } case 66: { bitField0_ |= 0x00000004; javaClass_ = input.readBytes(); break; } case 74: { bitField0_ |= 0x00000008; ruleId_ = input.readBytes(); break; } case 82: { bitField0_ |= 0x00000010; extends_ = input.readBytes(); break; } case 88: { bitField0_ |= 0x00000020; reportLooseTypeViolations_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { whitelist_ = new com.google.protobuf.UnmodifiableLazyStringList(whitelist_); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = new com.google.protobuf.UnmodifiableLazyStringList(whitelistRegexp_); } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { onlyApplyTo_ = new com.google.protobuf.UnmodifiableLazyStringList(onlyApplyTo_); } if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyToRegexp_ = new com.google.protobuf.UnmodifiableLazyStringList(onlyApplyToRegexp_); } if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { value_ = new com.google.protobuf.UnmodifiableLazyStringList(value_); } 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.GeneratedMessage.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); } public static 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); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } /** * Protobuf enum {@code jscomp.Requirement.Type} * *
   * A classification of the requirement and how it is enforced.
   * 
*/ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * CUSTOM = 1; * *
     * A requirement enforced with code a external java class.
     * 
*/ CUSTOM(0, 1), /** * BANNED_DEPENDENCY = 2; * *
     * A forbidden source file
     * 
*/ BANNED_DEPENDENCY(1, 2), /** * BANNED_NAME = 3; * *
     * 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"
     * 
*/ BANNED_NAME(2, 3), /** * BANNED_PROPERTY = 4; * *
     * A banned instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * 
*/ BANNED_PROPERTY(3, 4), /** * BANNED_PROPERTY_READ = 5; * *
     * 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(4, 5), /** * BANNED_PROPERTY_WRITE = 6; * *
     * 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(5, 6), /** * RESTRICTED_NAME_CALL = 7; * *
     * A restricted call, for example:
     *  - the "parseInt" call must be called with a radix:
     *  parseInt:function(string, int)
     * 
*/ RESTRICTED_NAME_CALL(6, 7), /** * RESTRICTED_METHOD_CALL = 8; * *
     * 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(7, 8), /** * BANNED_CODE_PATTERN = 9; * *
     * 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(8, 9), /** * BANNED_PROPERTY_CALL = 10; * *
     * 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(9, 10), /** * BANNED_PROPERTY_NON_CONSTANT_WRITE = 11; * *
     * 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(10, 11), ; /** * CUSTOM = 1; * *
     * A requirement enforced with code a external java class.
     * 
*/ public static final int CUSTOM_VALUE = 1; /** * BANNED_DEPENDENCY = 2; * *
     * A forbidden source file
     * 
*/ public static final int BANNED_DEPENDENCY_VALUE = 2; /** * BANNED_NAME = 3; * *
     * 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"
     * 
*/ public static final int BANNED_NAME_VALUE = 3; /** * BANNED_PROPERTY = 4; * *
     * A banned instance property, for example:
     *  - An 'instance' property:   "namespace.Foo.prototype.banned"
     *  - All properties of a given name "Object.prototype.banned"
     * 
*/ public static final int BANNED_PROPERTY_VALUE = 4; /** * BANNED_PROPERTY_READ = 5; * *
     * 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.
     * 
*/ public static final int BANNED_PROPERTY_READ_VALUE = 5; /** * BANNED_PROPERTY_WRITE = 6; * *
     * 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.
     * 
*/ public static final int BANNED_PROPERTY_WRITE_VALUE = 6; /** * RESTRICTED_NAME_CALL = 7; * *
     * A restricted call, for example:
     *  - the "parseInt" call must be called with a radix:
     *  parseInt:function(string, int)
     * 
*/ public static final int RESTRICTED_NAME_CALL_VALUE = 7; /** * RESTRICTED_METHOD_CALL = 8; * *
     * A restricted call, for example:
     *  - The unsafe opt_html parameter must not be passed to createNode:
     *  goog.ui.tree.TreeControl.prototype.createNode:function()
     * 
*/ public static final int RESTRICTED_METHOD_CALL_VALUE = 8; /** * BANNED_CODE_PATTERN = 9; * *
     * 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);}"
     * 
*/ public static final int BANNED_CODE_PATTERN_VALUE = 9; /** * BANNED_PROPERTY_CALL = 10; * *
     * 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.
     * 
*/ public static final int BANNED_PROPERTY_CALL_VALUE = 10; /** * BANNED_PROPERTY_NON_CONSTANT_WRITE = 11; * *
     * 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.
     * 
*/ public static final int BANNED_PROPERTY_NON_CONSTANT_WRITE_VALUE = 11; public final int getNumber() { return value; } public static Type valueOf(int value) { switch (value) { case 1: return CUSTOM; case 2: return BANNED_DEPENDENCY; 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; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } 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 index; private final int value; private Type(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:jscomp.Requirement.Type) } private int bitField0_; // optional string error_message = 1; public static final int ERROR_MESSAGE_FIELD_NUMBER = 1; private java.lang.Object errorMessage_; /** * optional string error_message = 1; * *
   * Required: The message to report when a requirement is violated. This should
   * reference a document describing the reasoning for the requirement
   * and contacts.
   * 
*/ public boolean hasErrorMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional string error_message = 1; * *
   * Required: The message to report when a requirement is violated. This should
   * reference a document describing the reasoning for the requirement
   * and contacts.
   * 
*/ 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; } } /** * optional string error_message = 1; * *
   * Required: The message to report when a requirement is violated. This should
   * reference a document describing the reasoning for the requirement
   * and contacts.
   * 
*/ 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; } } // repeated string whitelist = 2; public static final int WHITELIST_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList whitelist_; /** * repeated string whitelist = 2; * *
   * Optional: A list of source paths that are exempt from the requirement.
   * 
*/ public java.util.List getWhitelistList() { return whitelist_; } /** * repeated string whitelist = 2; * *
   * Optional: A list of source paths that are exempt from the requirement.
   * 
*/ public int getWhitelistCount() { return whitelist_.size(); } /** * repeated string whitelist = 2; * *
   * Optional: A list of source paths that are exempt from the requirement.
   * 
*/ public java.lang.String getWhitelist(int index) { return whitelist_.get(index); } /** * repeated string whitelist = 2; * *
   * Optional: A list of source paths that are exempt from the requirement.
   * 
*/ public com.google.protobuf.ByteString getWhitelistBytes(int index) { return whitelist_.getByteString(index); } // repeated string whitelist_regexp = 3; public static final int WHITELIST_REGEXP_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList whitelistRegexp_; /** * repeated string whitelist_regexp = 3; * *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
*/ public java.util.List getWhitelistRegexpList() { return whitelistRegexp_; } /** * repeated string whitelist_regexp = 3; * *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
*/ public int getWhitelistRegexpCount() { return whitelistRegexp_.size(); } /** * repeated string whitelist_regexp = 3; * *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
*/ public java.lang.String getWhitelistRegexp(int index) { return whitelistRegexp_.get(index); } /** * repeated string whitelist_regexp = 3; * *
   * Optional: A list of source paths regexs that are exempt from the
   * requirement.
   * 
*/ public com.google.protobuf.ByteString getWhitelistRegexpBytes(int index) { return whitelistRegexp_.getByteString(index); } // repeated string only_apply_to = 4; public static final int ONLY_APPLY_TO_FIELD_NUMBER = 4; private com.google.protobuf.LazyStringList onlyApplyTo_; /** * repeated string only_apply_to = 4; * *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
*/ public java.util.List getOnlyApplyToList() { return onlyApplyTo_; } /** * repeated string only_apply_to = 4; * *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
*/ public int getOnlyApplyToCount() { return onlyApplyTo_.size(); } /** * repeated string only_apply_to = 4; * *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
*/ public java.lang.String getOnlyApplyTo(int index) { return onlyApplyTo_.get(index); } /** * repeated string only_apply_to = 4; * *
   * Optional: A list of source paths that will be checked for the requirement
   * (the opposite of whitelist).
   * 
*/ public com.google.protobuf.ByteString getOnlyApplyToBytes(int index) { return onlyApplyTo_.getByteString(index); } // repeated string only_apply_to_regexp = 5; public static final int ONLY_APPLY_TO_REGEXP_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList onlyApplyToRegexp_; /** * repeated string only_apply_to_regexp = 5; * *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
*/ public java.util.List getOnlyApplyToRegexpList() { return onlyApplyToRegexp_; } /** * repeated string only_apply_to_regexp = 5; * *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
*/ public int getOnlyApplyToRegexpCount() { return onlyApplyToRegexp_.size(); } /** * repeated string only_apply_to_regexp = 5; * *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
*/ public java.lang.String getOnlyApplyToRegexp(int index) { return onlyApplyToRegexp_.get(index); } /** * repeated string only_apply_to_regexp = 5; * *
   * Optional: A list of source path regexps that will be checked for
   * the requirement (the opposite of whitelist_regexp).
   * 
*/ public com.google.protobuf.ByteString getOnlyApplyToRegexpBytes(int index) { return onlyApplyToRegexp_.getByteString(index); } // optional .jscomp.Requirement.Type type = 6; public static final int TYPE_FIELD_NUMBER = 6; private com.google.javascript.jscomp.Requirement.Type type_; /** * optional .jscomp.Requirement.Type type = 6; * *
   * Required: The type of requirement.
   * 
*/ public boolean hasType() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional .jscomp.Requirement.Type type = 6; * *
   * Required: The type of requirement.
   * 
*/ public com.google.javascript.jscomp.Requirement.Type getType() { return type_; } // repeated string value = 7; public static final int VALUE_FIELD_NUMBER = 7; private com.google.protobuf.LazyStringList value_; /** * repeated string value = 7; * *
   * The value banned, optional for "custom" requirements.
   * 
*/ public java.util.List getValueList() { return value_; } /** * repeated string value = 7; * *
   * The value banned, optional for "custom" requirements.
   * 
*/ public int getValueCount() { return value_.size(); } /** * repeated string value = 7; * *
   * The value banned, optional for "custom" requirements.
   * 
*/ public java.lang.String getValue(int index) { return value_.get(index); } /** * repeated string value = 7; * *
   * The value banned, optional for "custom" requirements.
   * 
*/ public com.google.protobuf.ByteString getValueBytes(int index) { return value_.getByteString(index); } // optional string java_class = 8; public static final int JAVA_CLASS_FIELD_NUMBER = 8; private java.lang.Object javaClass_; /** * optional string java_class = 8; * *
   * For "custom" requirements, the Java class used to enforce the requirement.
   * Ignored otherwise.
   * 
*/ public boolean hasJavaClass() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional string java_class = 8; * *
   * For "custom" requirements, the Java class used to enforce the requirement.
   * Ignored otherwise.
   * 
*/ 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; } } /** * optional string java_class = 8; * *
   * For "custom" requirements, the Java class used to enforce the requirement.
   * Ignored otherwise.
   * 
*/ 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; } } // optional string rule_id = 9; public static final int RULE_ID_FIELD_NUMBER = 9; private java.lang.Object ruleId_; /** * optional string rule_id = 9; * *
   * Gives the rule an unique ID that can be used for extending in other rules
   * through 'extends'. An example of ID is 'closure:innerHtml'.
   * 
*/ public boolean hasRuleId() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional string rule_id = 9; * *
   * Gives the rule an unique ID that can be used for extending in other rules
   * through 'extends'. An example of ID is 'closure:innerHtml'.
   * 
*/ 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; } } /** * optional string rule_id = 9; * *
   * Gives the rule an unique ID that can be used for extending in other rules
   * through 'extends'. An example of ID is 'closure:innerHtml'.
   * 
*/ 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; } } // optional string extends = 10; public static final int EXTENDS_FIELD_NUMBER = 10; private java.lang.Object extends_; /** * optional string extends = 10; * *
   * 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.
   * 
*/ public boolean hasExtends() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional string extends = 10; * *
   * 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.
   * 
*/ 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; } } /** * optional string extends = 10; * *
   * 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.
   * 
*/ 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; } } // optional bool report_loose_type_violations = 11 [default = true]; public static final int REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER = 11; private boolean reportLooseTypeViolations_; /** * optional bool report_loose_type_violations = 11 [default = 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).
   * 
*/ public boolean hasReportLooseTypeViolations() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional bool report_loose_type_violations = 11 [default = 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).
   * 
*/ public boolean getReportLooseTypeViolations() { return reportLooseTypeViolations_; } private void initFields() { errorMessage_ = ""; whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY; whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; type_ = com.google.javascript.jscomp.Requirement.Type.CUSTOM; value_ = com.google.protobuf.LazyStringArrayList.EMPTY; javaClass_ = ""; ruleId_ = ""; extends_ = ""; reportLooseTypeViolations_ = true; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); com.google.protobuf.GeneratedMessage .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getErrorMessageBytes()); } for (int i = 0; i < whitelist_.size(); i++) { output.writeBytes(2, whitelist_.getByteString(i)); } for (int i = 0; i < whitelistRegexp_.size(); i++) { output.writeBytes(3, whitelistRegexp_.getByteString(i)); } for (int i = 0; i < onlyApplyTo_.size(); i++) { output.writeBytes(4, onlyApplyTo_.getByteString(i)); } for (int i = 0; i < onlyApplyToRegexp_.size(); i++) { output.writeBytes(5, onlyApplyToRegexp_.getByteString(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(6, type_.getNumber()); } for (int i = 0; i < value_.size(); i++) { output.writeBytes(7, value_.getByteString(i)); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(8, getJavaClassBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(9, getRuleIdBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(10, getExtendsBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBool(11, reportLooseTypeViolations_); } extensionWriter.writeUntil(536870912, output); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getErrorMessageBytes()); } { int dataSize = 0; for (int i = 0; i < whitelist_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(whitelist_.getByteString(i)); } size += dataSize; size += 1 * getWhitelistList().size(); } { int dataSize = 0; for (int i = 0; i < whitelistRegexp_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(whitelistRegexp_.getByteString(i)); } size += dataSize; size += 1 * getWhitelistRegexpList().size(); } { int dataSize = 0; for (int i = 0; i < onlyApplyTo_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(onlyApplyTo_.getByteString(i)); } size += dataSize; size += 1 * getOnlyApplyToList().size(); } { int dataSize = 0; for (int i = 0; i < onlyApplyToRegexp_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(onlyApplyToRegexp_.getByteString(i)); } size += dataSize; size += 1 * getOnlyApplyToRegexpList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, type_.getNumber()); } { int dataSize = 0; for (int i = 0; i < value_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(value_.getByteString(i)); } size += dataSize; size += 1 * getValueList().size(); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(8, getJavaClassBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(9, getRuleIdBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(10, getExtendsBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(11, reportLooseTypeViolations_); } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } 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 PARSER.parseFrom(input); } public static com.google.javascript.jscomp.Requirement parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.google.javascript.jscomp.Requirement parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.google.javascript.jscomp.Requirement parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.google.javascript.jscomp.Requirement parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.google.javascript.jscomp.Requirement parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.google.javascript.jscomp.Requirement prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code jscomp.Requirement} * *
   * A specification of code requirements
   * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.ExtendableBuilder< com.google.javascript.jscomp.Requirement, Builder> implements 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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } 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); onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); type_ = com.google.javascript.jscomp.Requirement.Type.CUSTOM; bitField0_ = (bitField0_ & ~0x00000020); value_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); javaClass_ = ""; bitField0_ = (bitField0_ & ~0x00000080); ruleId_ = ""; bitField0_ = (bitField0_ & ~0x00000100); extends_ = ""; bitField0_ = (bitField0_ & ~0x00000200); reportLooseTypeViolations_ = true; bitField0_ = (bitField0_ & ~0x00000400); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } 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_ = new com.google.protobuf.UnmodifiableLazyStringList( whitelist_); bitField0_ = (bitField0_ & ~0x00000002); } result.whitelist_ = whitelist_; if (((bitField0_ & 0x00000004) == 0x00000004)) { whitelistRegexp_ = new com.google.protobuf.UnmodifiableLazyStringList( whitelistRegexp_); bitField0_ = (bitField0_ & ~0x00000004); } result.whitelistRegexp_ = whitelistRegexp_; if (((bitField0_ & 0x00000008) == 0x00000008)) { onlyApplyTo_ = new com.google.protobuf.UnmodifiableLazyStringList( onlyApplyTo_); bitField0_ = (bitField0_ & ~0x00000008); } result.onlyApplyTo_ = onlyApplyTo_; if (((bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyToRegexp_ = new com.google.protobuf.UnmodifiableLazyStringList( onlyApplyToRegexp_); bitField0_ = (bitField0_ & ~0x00000010); } result.onlyApplyToRegexp_ = onlyApplyToRegexp_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000002; } result.type_ = type_; if (((bitField0_ & 0x00000040) == 0x00000040)) { value_ = new com.google.protobuf.UnmodifiableLazyStringList( value_); bitField0_ = (bitField0_ & ~0x00000040); } result.value_ = value_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000004; } result.javaClass_ = javaClass_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000008; } result.ruleId_ = ruleId_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000010; } result.extends_ = extends_; if (((from_bitField0_ & 0x00000400) == 0x00000400)) { to_bitField0_ |= 0x00000020; } result.reportLooseTypeViolations_ = reportLooseTypeViolations_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } 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 (!other.onlyApplyTo_.isEmpty()) { if (onlyApplyTo_.isEmpty()) { onlyApplyTo_ = other.onlyApplyTo_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureOnlyApplyToIsMutable(); onlyApplyTo_.addAll(other.onlyApplyTo_); } onChanged(); } if (!other.onlyApplyToRegexp_.isEmpty()) { if (onlyApplyToRegexp_.isEmpty()) { onlyApplyToRegexp_ = other.onlyApplyToRegexp_; bitField0_ = (bitField0_ & ~0x00000010); } 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_ & ~0x00000040); } else { ensureValueIsMutable(); value_.addAll(other.value_); } onChanged(); } if (other.hasJavaClass()) { bitField0_ |= 0x00000080; javaClass_ = other.javaClass_; onChanged(); } if (other.hasRuleId()) { bitField0_ |= 0x00000100; ruleId_ = other.ruleId_; onChanged(); } if (other.hasExtends()) { bitField0_ |= 0x00000200; extends_ = other.extends_; onChanged(); } if (other.hasReportLooseTypeViolations()) { setReportLooseTypeViolations(other.getReportLooseTypeViolations()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); 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; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // optional string error_message = 1; private java.lang.Object errorMessage_ = ""; /** * optional string error_message = 1; * *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
*/ public boolean hasErrorMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional string error_message = 1; * *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
*/ public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); errorMessage_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string error_message = 1; * *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
*/ 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; } } /** * optional string error_message = 1; * *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
*/ public Builder setErrorMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; errorMessage_ = value; onChanged(); return this; } /** * optional string error_message = 1; * *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
*/ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000001); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /** * optional string error_message = 1; * *
     * Required: The message to report when a requirement is violated. This should
     * reference a document describing the reasoning for the requirement
     * and contacts.
     * 
*/ public Builder setErrorMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; errorMessage_ = value; onChanged(); return this; } // repeated string whitelist = 2; 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; } } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public java.util.List getWhitelistList() { return java.util.Collections.unmodifiableList(whitelist_); } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public int getWhitelistCount() { return whitelist_.size(); } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public java.lang.String getWhitelist(int index) { return whitelist_.get(index); } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public com.google.protobuf.ByteString getWhitelistBytes(int index) { return whitelist_.getByteString(index); } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public Builder setWhitelist( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistIsMutable(); whitelist_.set(index, value); onChanged(); return this; } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public Builder addWhitelist( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistIsMutable(); whitelist_.add(value); onChanged(); return this; } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public Builder addAllWhitelist( java.lang.Iterable values) { ensureWhitelistIsMutable(); super.addAll(values, whitelist_); onChanged(); return this; } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public Builder clearWhitelist() { whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * repeated string whitelist = 2; * *
     * Optional: A list of source paths that are exempt from the requirement.
     * 
*/ public Builder addWhitelistBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistIsMutable(); whitelist_.add(value); onChanged(); return this; } // repeated string whitelist_regexp = 3; 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; } } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public java.util.List getWhitelistRegexpList() { return java.util.Collections.unmodifiableList(whitelistRegexp_); } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public int getWhitelistRegexpCount() { return whitelistRegexp_.size(); } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public java.lang.String getWhitelistRegexp(int index) { return whitelistRegexp_.get(index); } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public com.google.protobuf.ByteString getWhitelistRegexpBytes(int index) { return whitelistRegexp_.getByteString(index); } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public Builder setWhitelistRegexp( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistRegexpIsMutable(); whitelistRegexp_.set(index, value); onChanged(); return this; } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public Builder addWhitelistRegexp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistRegexpIsMutable(); whitelistRegexp_.add(value); onChanged(); return this; } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public Builder addAllWhitelistRegexp( java.lang.Iterable values) { ensureWhitelistRegexpIsMutable(); super.addAll(values, whitelistRegexp_); onChanged(); return this; } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public Builder clearWhitelistRegexp() { whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * repeated string whitelist_regexp = 3; * *
     * Optional: A list of source paths regexs that are exempt from the
     * requirement.
     * 
*/ public Builder addWhitelistRegexpBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureWhitelistRegexpIsMutable(); whitelistRegexp_.add(value); onChanged(); return this; } // repeated string only_apply_to = 4; private com.google.protobuf.LazyStringList onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureOnlyApplyToIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { onlyApplyTo_ = new com.google.protobuf.LazyStringArrayList(onlyApplyTo_); bitField0_ |= 0x00000008; } } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public java.util.List getOnlyApplyToList() { return java.util.Collections.unmodifiableList(onlyApplyTo_); } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public int getOnlyApplyToCount() { return onlyApplyTo_.size(); } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public java.lang.String getOnlyApplyTo(int index) { return onlyApplyTo_.get(index); } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public com.google.protobuf.ByteString getOnlyApplyToBytes(int index) { return onlyApplyTo_.getByteString(index); } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public Builder setOnlyApplyTo( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToIsMutable(); onlyApplyTo_.set(index, value); onChanged(); return this; } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public Builder addOnlyApplyTo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToIsMutable(); onlyApplyTo_.add(value); onChanged(); return this; } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public Builder addAllOnlyApplyTo( java.lang.Iterable values) { ensureOnlyApplyToIsMutable(); super.addAll(values, onlyApplyTo_); onChanged(); return this; } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public Builder clearOnlyApplyTo() { onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * repeated string only_apply_to = 4; * *
     * Optional: A list of source paths that will be checked for the requirement
     * (the opposite of whitelist).
     * 
*/ public Builder addOnlyApplyToBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToIsMutable(); onlyApplyTo_.add(value); onChanged(); return this; } // repeated string only_apply_to_regexp = 5; private com.google.protobuf.LazyStringList onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureOnlyApplyToRegexpIsMutable() { if (!((bitField0_ & 0x00000010) == 0x00000010)) { onlyApplyToRegexp_ = new com.google.protobuf.LazyStringArrayList(onlyApplyToRegexp_); bitField0_ |= 0x00000010; } } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public java.util.List getOnlyApplyToRegexpList() { return java.util.Collections.unmodifiableList(onlyApplyToRegexp_); } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public int getOnlyApplyToRegexpCount() { return onlyApplyToRegexp_.size(); } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public java.lang.String getOnlyApplyToRegexp(int index) { return onlyApplyToRegexp_.get(index); } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public com.google.protobuf.ByteString getOnlyApplyToRegexpBytes(int index) { return onlyApplyToRegexp_.getByteString(index); } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public Builder setOnlyApplyToRegexp( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.set(index, value); onChanged(); return this; } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public Builder addOnlyApplyToRegexp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.add(value); onChanged(); return this; } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public Builder addAllOnlyApplyToRegexp( java.lang.Iterable values) { ensureOnlyApplyToRegexpIsMutable(); super.addAll(values, onlyApplyToRegexp_); onChanged(); return this; } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public Builder clearOnlyApplyToRegexp() { onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * repeated string only_apply_to_regexp = 5; * *
     * Optional: A list of source path regexps that will be checked for
     * the requirement (the opposite of whitelist_regexp).
     * 
*/ public Builder addOnlyApplyToRegexpBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureOnlyApplyToRegexpIsMutable(); onlyApplyToRegexp_.add(value); onChanged(); return this; } // optional .jscomp.Requirement.Type type = 6; private com.google.javascript.jscomp.Requirement.Type type_ = com.google.javascript.jscomp.Requirement.Type.CUSTOM; /** * optional .jscomp.Requirement.Type type = 6; * *
     * Required: The type of requirement.
     * 
*/ public boolean hasType() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional .jscomp.Requirement.Type type = 6; * *
     * Required: The type of requirement.
     * 
*/ public com.google.javascript.jscomp.Requirement.Type getType() { return type_; } /** * optional .jscomp.Requirement.Type type = 6; * *
     * Required: The type of requirement.
     * 
*/ public Builder setType(com.google.javascript.jscomp.Requirement.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; type_ = value; onChanged(); return this; } /** * optional .jscomp.Requirement.Type type = 6; * *
     * Required: The type of requirement.
     * 
*/ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000020); type_ = com.google.javascript.jscomp.Requirement.Type.CUSTOM; onChanged(); return this; } // repeated string value = 7; private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureValueIsMutable() { if (!((bitField0_ & 0x00000040) == 0x00000040)) { value_ = new com.google.protobuf.LazyStringArrayList(value_); bitField0_ |= 0x00000040; } } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public java.util.List getValueList() { return java.util.Collections.unmodifiableList(value_); } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public int getValueCount() { return value_.size(); } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public java.lang.String getValue(int index) { return value_.get(index); } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public com.google.protobuf.ByteString getValueBytes(int index) { return value_.getByteString(index); } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public Builder setValue( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureValueIsMutable(); value_.set(index, value); onChanged(); return this; } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public Builder addValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureValueIsMutable(); value_.add(value); onChanged(); return this; } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public Builder addAllValue( java.lang.Iterable values) { ensureValueIsMutable(); super.addAll(values, value_); onChanged(); return this; } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public Builder clearValue() { value_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** * repeated string value = 7; * *
     * The value banned, optional for "custom" requirements.
     * 
*/ public Builder addValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureValueIsMutable(); value_.add(value); onChanged(); return this; } // optional string java_class = 8; private java.lang.Object javaClass_ = ""; /** * optional string java_class = 8; * *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
*/ public boolean hasJavaClass() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional string java_class = 8; * *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
*/ public java.lang.String getJavaClass() { java.lang.Object ref = javaClass_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); javaClass_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string java_class = 8; * *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
*/ 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; } } /** * optional string java_class = 8; * *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
*/ public Builder setJavaClass( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; javaClass_ = value; onChanged(); return this; } /** * optional string java_class = 8; * *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
*/ public Builder clearJavaClass() { bitField0_ = (bitField0_ & ~0x00000080); javaClass_ = getDefaultInstance().getJavaClass(); onChanged(); return this; } /** * optional string java_class = 8; * *
     * For "custom" requirements, the Java class used to enforce the requirement.
     * Ignored otherwise.
     * 
*/ public Builder setJavaClassBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; javaClass_ = value; onChanged(); return this; } // optional string rule_id = 9; private java.lang.Object ruleId_ = ""; /** * optional string rule_id = 9; * *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
*/ public boolean hasRuleId() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional string rule_id = 9; * *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
*/ public java.lang.String getRuleId() { java.lang.Object ref = ruleId_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); ruleId_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string rule_id = 9; * *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
*/ 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; } } /** * optional string rule_id = 9; * *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
*/ public Builder setRuleId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; ruleId_ = value; onChanged(); return this; } /** * optional string rule_id = 9; * *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
*/ public Builder clearRuleId() { bitField0_ = (bitField0_ & ~0x00000100); ruleId_ = getDefaultInstance().getRuleId(); onChanged(); return this; } /** * optional string rule_id = 9; * *
     * Gives the rule an unique ID that can be used for extending in other rules
     * through 'extends'. An example of ID is 'closure:innerHtml'.
     * 
*/ public Builder setRuleIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; ruleId_ = value; onChanged(); return this; } // optional string extends = 10; private java.lang.Object extends_ = ""; /** * optional string extends = 10; * *
     * 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.
     * 
*/ public boolean hasExtends() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * optional string extends = 10; * *
     * 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.
     * 
*/ public java.lang.String getExtends() { java.lang.Object ref = extends_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); extends_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string extends = 10; * *
     * 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.
     * 
*/ 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; } } /** * optional string extends = 10; * *
     * 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.
     * 
*/ public Builder setExtends( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; extends_ = value; onChanged(); return this; } /** * optional string extends = 10; * *
     * 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.
     * 
*/ public Builder clearExtends() { bitField0_ = (bitField0_ & ~0x00000200); extends_ = getDefaultInstance().getExtends(); onChanged(); return this; } /** * optional string extends = 10; * *
     * 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.
     * 
*/ public Builder setExtendsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; extends_ = value; onChanged(); return this; } // optional bool report_loose_type_violations = 11 [default = true]; private boolean reportLooseTypeViolations_ = true; /** * optional bool report_loose_type_violations = 11 [default = 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).
     * 
*/ public boolean hasReportLooseTypeViolations() { return ((bitField0_ & 0x00000400) == 0x00000400); } /** * optional bool report_loose_type_violations = 11 [default = 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).
     * 
*/ public boolean getReportLooseTypeViolations() { return reportLooseTypeViolations_; } /** * optional bool report_loose_type_violations = 11 [default = 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).
     * 
*/ public Builder setReportLooseTypeViolations(boolean value) { bitField0_ |= 0x00000400; reportLooseTypeViolations_ = value; onChanged(); return this; } /** * optional bool report_loose_type_violations = 11 [default = 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).
     * 
*/ public Builder clearReportLooseTypeViolations() { bitField0_ = (bitField0_ & ~0x00000400); reportLooseTypeViolations_ = true; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:jscomp.Requirement) } static { defaultInstance = new Requirement(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:jscomp.Requirement) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy