Package com.google.javascript.jscomp
Class Requirement
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.protobuf.GeneratedMessageV3.ExtendableMessage<Requirement>
-
- com.google.javascript.jscomp.Requirement
-
- All Implemented Interfaces:
RequirementOrBuilder,com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<Requirement>,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable
public final class Requirement extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<Requirement> implements RequirementOrBuilder
A specification of code requirements NEXT ID: 17
Protobuf typejscomp.Requirement- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequirement.BuilderA specification of code requirements NEXT ID: 17static classRequirement.SeverityWith what severity to report the issue by default.static classRequirement.TypeA classification of the requirement and how it is enforced.static classRequirement.TypeMatchingStrategyProtobuf enumjscomp.Requirement.TypeMatchingStrategystatic classRequirement.WhitelistEntryProtobuf typejscomp.Requirement.WhitelistEntrystatic interfaceRequirement.WhitelistEntryOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3.ExtendableMessage
com.google.protobuf.GeneratedMessageV3.ExtendableMessage.ExtensionWriter
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOW_EXTENDING_VALUE_FIELD_NUMBERstatic intCONFIG_FILE_FIELD_NUMBERstatic intERROR_MESSAGE_FIELD_NUMBERstatic intEXTENDS_FIELD_NUMBERstatic intJAVA_CLASS_FIELD_NUMBERstatic intONLY_APPLY_TO_FIELD_NUMBERstatic intONLY_APPLY_TO_REGEXP_FIELD_NUMBERstatic com.google.protobuf.Parser<Requirement>PARSERDeprecated.static intREPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBERstatic intRULE_ID_FIELD_NUMBERstatic intSEVERITY_FIELD_NUMBERstatic intTYPE_FIELD_NUMBERstatic intTYPE_MATCHING_STRATEGY_FIELD_NUMBERstatic intVALUE_FIELD_NUMBERstatic intWHITELIST_ENTRY_FIELD_NUMBERstatic intWHITELIST_FIELD_NUMBERstatic intWHITELIST_REGEXP_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)booleangetAllowExtendingValue()Whether to allow subconfigs to extend the "value" field.java.lang.StringgetConfigFile(int index)The file(s) that defined this requirement.com.google.protobuf.ByteStringgetConfigFileBytes(int index)The file(s) that defined this requirement.intgetConfigFileCount()The file(s) that defined this requirement.com.google.protobuf.ProtocolStringListgetConfigFileList()The file(s) that defined this requirement.static RequirementgetDefaultInstance()RequirementgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()java.lang.StringgetErrorMessage()Required: The message to report when a requirement is violated.com.google.protobuf.ByteStringgetErrorMessageBytes()Required: The message to report when a requirement is violated.java.lang.StringgetExtends()Allows extending whitelists of rules with the specified rule_id.com.google.protobuf.ByteStringgetExtendsBytes()Allows extending whitelists of rules with the specified rule_id.java.lang.StringgetJavaClass()For "custom" requirements, the Java class used to enforce the requirement.com.google.protobuf.ByteStringgetJavaClassBytes()For "custom" requirements, the Java class used to enforce the requirement.java.lang.StringgetOnlyApplyTo(int index)Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).com.google.protobuf.ByteStringgetOnlyApplyToBytes(int index)Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).intgetOnlyApplyToCount()Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).com.google.protobuf.ProtocolStringListgetOnlyApplyToList()Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).java.lang.StringgetOnlyApplyToRegexp(int index)Optional: A list of source path regexps that will be checked for the requirement (the opposite of whitelist_regexp).com.google.protobuf.ByteStringgetOnlyApplyToRegexpBytes(int index)Optional: A list of source path regexps that will be checked for the requirement (the opposite of whitelist_regexp).intgetOnlyApplyToRegexpCount()Optional: A list of source path regexps that will be checked for the requirement (the opposite of whitelist_regexp).com.google.protobuf.ProtocolStringListgetOnlyApplyToRegexpList()Optional: A list of source path regexps that will be checked for the requirement (the opposite of whitelist_regexp).com.google.protobuf.Parser<Requirement>getParserForType()booleangetReportLooseTypeViolations()Whether to report possible violations when type information is not exact.java.lang.StringgetRuleId()Gives the rule an unique ID that can be used for extending in other rules through 'extends'.com.google.protobuf.ByteStringgetRuleIdBytes()Gives the rule an unique ID that can be used for extending in other rules through 'extends'.intgetSerializedSize()Requirement.SeveritygetSeverity()optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];Requirement.TypegetType()Required: The type of requirement.Requirement.TypeMatchingStrategygetTypeMatchingStrategy()Strategy to use for matching types in the value parameter (e.g.com.google.protobuf.UnknownFieldSetgetUnknownFields()java.lang.StringgetValue(int index)The value banned, optional for "custom" requirements.com.google.protobuf.ByteStringgetValueBytes(int index)The value banned, optional for "custom" requirements.intgetValueCount()The value banned, optional for "custom" requirements.com.google.protobuf.ProtocolStringListgetValueList()The value banned, optional for "custom" requirements.java.lang.StringgetWhitelist(int index)Optional: A list of source path prefixes that are exempt from the requirement.com.google.protobuf.ByteStringgetWhitelistBytes(int index)Optional: A list of source path prefixes that are exempt from the requirement.intgetWhitelistCount()Optional: A list of source path prefixes that are exempt from the requirement.Requirement.WhitelistEntrygetWhitelistEntry(int index)repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;intgetWhitelistEntryCount()repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;java.util.List<Requirement.WhitelistEntry>getWhitelistEntryList()repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;Requirement.WhitelistEntryOrBuildergetWhitelistEntryOrBuilder(int index)repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;java.util.List<? extends Requirement.WhitelistEntryOrBuilder>getWhitelistEntryOrBuilderList()repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;com.google.protobuf.ProtocolStringListgetWhitelistList()Optional: A list of source path prefixes that are exempt from the requirement.java.lang.StringgetWhitelistRegexp(int index)Optional: A list of source paths regexs that are exempt from the requirement.com.google.protobuf.ByteStringgetWhitelistRegexpBytes(int index)Optional: A list of source paths regexs that are exempt from the requirement.intgetWhitelistRegexpCount()Optional: A list of source paths regexs that are exempt from the requirement.com.google.protobuf.ProtocolStringListgetWhitelistRegexpList()Optional: A list of source paths regexs that are exempt from the requirement.booleanhasAllowExtendingValue()Whether to allow subconfigs to extend the "value" field.booleanhasErrorMessage()Required: The message to report when a requirement is violated.booleanhasExtends()Allows extending whitelists of rules with the specified rule_id.inthashCode()booleanhasJavaClass()For "custom" requirements, the Java class used to enforce the requirement.booleanhasReportLooseTypeViolations()Whether to report possible violations when type information is not exact.booleanhasRuleId()Gives the rule an unique ID that can be used for extending in other rules through 'extends'.booleanhasSeverity()optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];booleanhasType()Required: The type of requirement.booleanhasTypeMatchingStrategy()Strategy to use for matching types in the value parameter (e.g.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Requirement.BuildernewBuilder()static Requirement.BuildernewBuilder(Requirement prototype)Requirement.BuildernewBuilderForType()protected Requirement.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static RequirementparseDelimitedFrom(java.io.InputStream input)static RequirementparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RequirementparseFrom(byte[] data)static RequirementparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RequirementparseFrom(com.google.protobuf.ByteString data)static RequirementparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RequirementparseFrom(com.google.protobuf.CodedInputStream input)static RequirementparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RequirementparseFrom(java.io.InputStream input)static RequirementparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RequirementparseFrom(java.nio.ByteBuffer data)static RequirementparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Requirement>parser()Requirement.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.ExtendableMessage
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasExtension, hasExtension, hasField, makeExtensionsImmutable, newExtensionWriter, newMessageSetExtensionWriter, parseUnknownField, parseUnknownFieldProto3
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getDescriptorForType, getOneofFieldDescriptor, hasOneof, internalGetMapField, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder
getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, hasExtension, hasExtension, hasExtension
-
-
-
-
Field Detail
-
ERROR_MESSAGE_FIELD_NUMBER
public static final int ERROR_MESSAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
WHITELIST_FIELD_NUMBER
public static final int WHITELIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
WHITELIST_REGEXP_FIELD_NUMBER
public static final int WHITELIST_REGEXP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
WHITELIST_ENTRY_FIELD_NUMBER
public static final int WHITELIST_ENTRY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ONLY_APPLY_TO_FIELD_NUMBER
public static final int ONLY_APPLY_TO_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ONLY_APPLY_TO_REGEXP_FIELD_NUMBER
public static final int ONLY_APPLY_TO_REGEXP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VALUE_FIELD_NUMBER
public static final int VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALLOW_EXTENDING_VALUE_FIELD_NUMBER
public static final int ALLOW_EXTENDING_VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TYPE_MATCHING_STRATEGY_FIELD_NUMBER
public static final int TYPE_MATCHING_STRATEGY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
JAVA_CLASS_FIELD_NUMBER
public static final int JAVA_CLASS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RULE_ID_FIELD_NUMBER
public static final int RULE_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXTENDS_FIELD_NUMBER
public static final int EXTENDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER
public static final int REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SEVERITY_FIELD_NUMBER
public static final int SEVERITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONFIG_FILE_FIELD_NUMBER
public static final int CONFIG_FILE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<Requirement> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasErrorMessage
public boolean hasErrorMessage()
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;- Specified by:
hasErrorMessagein interfaceRequirementOrBuilder- Returns:
- Whether the errorMessage field is set.
-
getErrorMessage
public java.lang.String getErrorMessage()
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;- Specified by:
getErrorMessagein interfaceRequirementOrBuilder- Returns:
- The errorMessage.
-
getErrorMessageBytes
public com.google.protobuf.ByteString getErrorMessageBytes()
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;- Specified by:
getErrorMessageBytesin interfaceRequirementOrBuilder- Returns:
- The bytes for errorMessage.
-
getWhitelistList
public com.google.protobuf.ProtocolStringList getWhitelistList()
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;- Specified by:
getWhitelistListin interfaceRequirementOrBuilder- Returns:
- A list containing the whitelist.
-
getWhitelistCount
public int getWhitelistCount()
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;- Specified by:
getWhitelistCountin interfaceRequirementOrBuilder- Returns:
- The count of whitelist.
-
getWhitelist
public java.lang.String getWhitelist(int index)
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;- Specified by:
getWhitelistin interfaceRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The whitelist at the given index.
-
getWhitelistBytes
public com.google.protobuf.ByteString getWhitelistBytes(int index)
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;- Specified by:
getWhitelistBytesin interfaceRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the whitelist at the given index.
-
getWhitelistRegexpList
public com.google.protobuf.ProtocolStringList getWhitelistRegexpList()
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;- Specified by:
getWhitelistRegexpListin interfaceRequirementOrBuilder- Returns:
- A list containing the whitelistRegexp.
-
getWhitelistRegexpCount
public int getWhitelistRegexpCount()
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;- Specified by:
getWhitelistRegexpCountin interfaceRequirementOrBuilder- Returns:
- The count of whitelistRegexp.
-
getWhitelistRegexp
public java.lang.String getWhitelistRegexp(int index)
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;- Specified by:
getWhitelistRegexpin interfaceRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The whitelistRegexp at the given index.
-
getWhitelistRegexpBytes
public com.google.protobuf.ByteString getWhitelistRegexpBytes(int index)
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;- Specified by:
getWhitelistRegexpBytesin interfaceRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the whitelistRegexp at the given index.
-
getWhitelistEntryList
public java.util.List<Requirement.WhitelistEntry> getWhitelistEntryList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;- Specified by:
getWhitelistEntryListin interfaceRequirementOrBuilder
-
getWhitelistEntryOrBuilderList
public java.util.List<? extends Requirement.WhitelistEntryOrBuilder> getWhitelistEntryOrBuilderList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;- Specified by:
getWhitelistEntryOrBuilderListin interfaceRequirementOrBuilder
-
getWhitelistEntryCount
public int getWhitelistEntryCount()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;- Specified by:
getWhitelistEntryCountin interfaceRequirementOrBuilder
-
getWhitelistEntry
public Requirement.WhitelistEntry getWhitelistEntry(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;- Specified by:
getWhitelistEntryin interfaceRequirementOrBuilder
-
getWhitelistEntryOrBuilder
public Requirement.WhitelistEntryOrBuilder getWhitelistEntryOrBuilder(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;- Specified by:
getWhitelistEntryOrBuilderin interfaceRequirementOrBuilder
-
getOnlyApplyToList
public com.google.protobuf.ProtocolStringList getOnlyApplyToList()
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).
repeated string only_apply_to = 4;- Specified by:
getOnlyApplyToListin interfaceRequirementOrBuilder- Returns:
- A list containing the onlyApplyTo.
-
getOnlyApplyToCount
public int getOnlyApplyToCount()
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).
repeated string only_apply_to = 4;- Specified by:
getOnlyApplyToCountin interfaceRequirementOrBuilder- Returns:
- The count of onlyApplyTo.
-
getOnlyApplyTo
public java.lang.String getOnlyApplyTo(int index)
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).
repeated string only_apply_to = 4;- Specified by:
getOnlyApplyToin interfaceRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The onlyApplyTo at the given index.
-
getOnlyApplyToBytes
public com.google.protobuf.ByteString getOnlyApplyToBytes(int index)
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).
repeated string only_apply_to = 4;- Specified by:
getOnlyApplyToBytesin interfaceRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the onlyApplyTo at the given index.
-
getOnlyApplyToRegexpList
public com.google.protobuf.ProtocolStringList getOnlyApplyToRegexpList()
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;- Specified by:
getOnlyApplyToRegexpListin interfaceRequirementOrBuilder- Returns:
- A list containing the onlyApplyToRegexp.
-
getOnlyApplyToRegexpCount
public int getOnlyApplyToRegexpCount()
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;- Specified by:
getOnlyApplyToRegexpCountin interfaceRequirementOrBuilder- Returns:
- The count of onlyApplyToRegexp.
-
getOnlyApplyToRegexp
public java.lang.String getOnlyApplyToRegexp(int 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;- Specified by:
getOnlyApplyToRegexpin interfaceRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The onlyApplyToRegexp at the given index.
-
getOnlyApplyToRegexpBytes
public com.google.protobuf.ByteString getOnlyApplyToRegexpBytes(int 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;- Specified by:
getOnlyApplyToRegexpBytesin interfaceRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the onlyApplyToRegexp at the given index.
-
hasType
public boolean hasType()
Required: The type of requirement.
optional .jscomp.Requirement.Type type = 6;- Specified by:
hasTypein interfaceRequirementOrBuilder- Returns:
- Whether the type field is set.
-
getType
public Requirement.Type getType()
Required: The type of requirement.
optional .jscomp.Requirement.Type type = 6;- Specified by:
getTypein interfaceRequirementOrBuilder- Returns:
- The type.
-
getValueList
public com.google.protobuf.ProtocolStringList getValueList()
The value banned, optional for "custom" requirements. Some custom requirements repurpose this for different purposes, such as for whitelists of types.
repeated string value = 7;- Specified by:
getValueListin interfaceRequirementOrBuilder- Returns:
- A list containing the value.
-
getValueCount
public int getValueCount()
The value banned, optional for "custom" requirements. Some custom requirements repurpose this for different purposes, such as for whitelists of types.
repeated string value = 7;- Specified by:
getValueCountin interfaceRequirementOrBuilder- Returns:
- The count of value.
-
getValue
public java.lang.String getValue(int index)
The value banned, optional for "custom" requirements. Some custom requirements repurpose this for different purposes, such as for whitelists of types.
repeated string value = 7;- Specified by:
getValuein interfaceRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The value at the given index.
-
getValueBytes
public com.google.protobuf.ByteString getValueBytes(int index)
The value banned, optional for "custom" requirements. Some custom requirements repurpose this for different purposes, such as for whitelists of types.
repeated string value = 7;- Specified by:
getValueBytesin interfaceRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the value at the given index.
-
hasAllowExtendingValue
public boolean hasAllowExtendingValue()
Whether to allow subconfigs to extend the "value" field. This does not make sense for banning values, but when the value is used as a whitelist, it becomes important.
optional bool allow_extending_value = 15;- Specified by:
hasAllowExtendingValuein interfaceRequirementOrBuilder- Returns:
- Whether the allowExtendingValue field is set.
-
getAllowExtendingValue
public boolean getAllowExtendingValue()
Whether to allow subconfigs to extend the "value" field. This does not make sense for banning values, but when the value is used as a whitelist, it becomes important.
optional bool allow_extending_value = 15;- Specified by:
getAllowExtendingValuein interfaceRequirementOrBuilder- Returns:
- The allowExtendingValue.
-
hasTypeMatchingStrategy
public boolean hasTypeMatchingStrategy()
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];- Specified by:
hasTypeMatchingStrategyin interfaceRequirementOrBuilder- Returns:
- Whether the typeMatchingStrategy field is set.
-
getTypeMatchingStrategy
public Requirement.TypeMatchingStrategy getTypeMatchingStrategy()
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];- Specified by:
getTypeMatchingStrategyin interfaceRequirementOrBuilder- Returns:
- The typeMatchingStrategy.
-
hasJavaClass
public boolean hasJavaClass()
For "custom" requirements, the Java class used to enforce the requirement. Ignored otherwise.
optional string java_class = 8;- Specified by:
hasJavaClassin interfaceRequirementOrBuilder- Returns:
- Whether the javaClass field is set.
-
getJavaClass
public java.lang.String getJavaClass()
For "custom" requirements, the Java class used to enforce the requirement. Ignored otherwise.
optional string java_class = 8;- Specified by:
getJavaClassin interfaceRequirementOrBuilder- Returns:
- The javaClass.
-
getJavaClassBytes
public com.google.protobuf.ByteString getJavaClassBytes()
For "custom" requirements, the Java class used to enforce the requirement. Ignored otherwise.
optional string java_class = 8;- Specified by:
getJavaClassBytesin interfaceRequirementOrBuilder- Returns:
- The bytes for javaClass.
-
hasRuleId
public boolean hasRuleId()
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;- Specified by:
hasRuleIdin interfaceRequirementOrBuilder- Returns:
- Whether the ruleId field is set.
-
getRuleId
public java.lang.String getRuleId()
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;- Specified by:
getRuleIdin interfaceRequirementOrBuilder- Returns:
- The ruleId.
-
getRuleIdBytes
public com.google.protobuf.ByteString getRuleIdBytes()
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;- Specified by:
getRuleIdBytesin interfaceRequirementOrBuilder- Returns:
- The bytes for ruleId.
-
hasExtends
public boolean hasExtends()
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;- Specified by:
hasExtendsin interfaceRequirementOrBuilder- Returns:
- Whether the extends field is set.
-
getExtends
public java.lang.String getExtends()
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;- Specified by:
getExtendsin interfaceRequirementOrBuilder- Returns:
- The extends.
-
getExtendsBytes
public com.google.protobuf.ByteString getExtendsBytes()
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;- Specified by:
getExtendsBytesin interfaceRequirementOrBuilder- Returns:
- The bytes for extends.
-
hasReportLooseTypeViolations
public boolean hasReportLooseTypeViolations()
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];- Specified by:
hasReportLooseTypeViolationsin interfaceRequirementOrBuilder- Returns:
- Whether the reportLooseTypeViolations field is set.
-
getReportLooseTypeViolations
public boolean getReportLooseTypeViolations()
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];- Specified by:
getReportLooseTypeViolationsin interfaceRequirementOrBuilder- Returns:
- The reportLooseTypeViolations.
-
hasSeverity
public boolean hasSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];- Specified by:
hasSeverityin interfaceRequirementOrBuilder- Returns:
- Whether the severity field is set.
-
getSeverity
public Requirement.Severity getSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];- Specified by:
getSeverityin interfaceRequirementOrBuilder- Returns:
- The severity.
-
getConfigFileList
public com.google.protobuf.ProtocolStringList getConfigFileList()
The file(s) that defined this requirement. If the requirement is extended, then all extending files are included as well. These will be printed in the error message.
repeated string config_file = 16;- Specified by:
getConfigFileListin interfaceRequirementOrBuilder- Returns:
- A list containing the configFile.
-
getConfigFileCount
public int getConfigFileCount()
The file(s) that defined this requirement. If the requirement is extended, then all extending files are included as well. These will be printed in the error message.
repeated string config_file = 16;- Specified by:
getConfigFileCountin interfaceRequirementOrBuilder- Returns:
- The count of configFile.
-
getConfigFile
public java.lang.String getConfigFile(int index)
The file(s) that defined this requirement. If the requirement is extended, then all extending files are included as well. These will be printed in the error message.
repeated string config_file = 16;- Specified by:
getConfigFilein interfaceRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The configFile at the given index.
-
getConfigFileBytes
public com.google.protobuf.ByteString getConfigFileBytes(int index)
The file(s) that defined this requirement. If the requirement is extended, then all extending files are included as well. These will be printed in the error message.
repeated string config_file = 16;- Specified by:
getConfigFileBytesin interfaceRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the configFile at the given index.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.ExtendableMessage<Requirement>
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Requirement parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Requirement parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Requirement parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Requirement parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Requirement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Requirement parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Requirement parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Requirement parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Requirement parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Requirement parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Requirement parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Requirement parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public Requirement.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Requirement.Builder newBuilder()
-
newBuilder
public static Requirement.Builder newBuilder(Requirement prototype)
-
toBuilder
public Requirement.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Requirement.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Requirement getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Requirement> parser()
-
getParserForType
public com.google.protobuf.Parser<Requirement> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Requirement getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<Requirement>- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-