Package com.google.javascript.jscomp
Interface RequirementOrBuilder
-
- All Superinterfaces:
com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<Requirement>
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Requirement
,Requirement.Builder
public interface RequirementOrBuilder extends com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<Requirement>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
getAllowExtendingValue()
Whether to allow subconfigs to extend the "value" field.java.lang.String
getConfigFile(int index)
The file(s) that defined this requirement.com.google.protobuf.ByteString
getConfigFileBytes(int index)
The file(s) that defined this requirement.int
getConfigFileCount()
The file(s) that defined this requirement.java.util.List<java.lang.String>
getConfigFileList()
The file(s) that defined this requirement.java.lang.String
getErrorMessage()
Required: The message to report when a requirement is violated.com.google.protobuf.ByteString
getErrorMessageBytes()
Required: The message to report when a requirement is violated.java.lang.String
getExtends()
Allows extending whitelists of rules with the specified rule_id.com.google.protobuf.ByteString
getExtendsBytes()
Allows extending whitelists of rules with the specified rule_id.java.lang.String
getJavaClass()
For "custom" requirements, the Java class used to enforce the requirement.com.google.protobuf.ByteString
getJavaClassBytes()
For "custom" requirements, the Java class used to enforce the requirement.java.lang.String
getOnlyApplyTo(int index)
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).com.google.protobuf.ByteString
getOnlyApplyToBytes(int index)
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).int
getOnlyApplyToCount()
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).java.util.List<java.lang.String>
getOnlyApplyToList()
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).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).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).int
getOnlyApplyToRegexpCount()
Optional: A list of source path regexps that will be checked for the requirement (the opposite of whitelist_regexp).java.util.List<java.lang.String>
getOnlyApplyToRegexpList()
Optional: A list of source path regexps that will be checked for the requirement (the opposite of whitelist_regexp).boolean
getReportLooseTypeViolations()
Whether to report possible violations when type information is not exact.java.lang.String
getRuleId()
Gives the rule an unique ID that can be used for extending in other rules through 'extends'.com.google.protobuf.ByteString
getRuleIdBytes()
Gives the rule an unique ID that can be used for extending in other rules through 'extends'.Requirement.Severity
getSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
Requirement.Type
getType()
Required: The type of requirement.Requirement.TypeMatchingStrategy
getTypeMatchingStrategy()
Strategy to use for matching types in the value parameter (e.g.java.lang.String
getValue(int index)
The value banned, optional for "custom" requirements.com.google.protobuf.ByteString
getValueBytes(int index)
The value banned, optional for "custom" requirements.int
getValueCount()
The value banned, optional for "custom" requirements.java.util.List<java.lang.String>
getValueList()
The value banned, optional for "custom" requirements.java.lang.String
getWhitelist(int index)
Optional: A list of source path prefixes that are exempt from the requirement.com.google.protobuf.ByteString
getWhitelistBytes(int index)
Optional: A list of source path prefixes that are exempt from the requirement.int
getWhitelistCount()
Optional: A list of source path prefixes that are exempt from the requirement.Requirement.WhitelistEntry
getWhitelistEntry(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
int
getWhitelistEntryCount()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
java.util.List<Requirement.WhitelistEntry>
getWhitelistEntryList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
Requirement.WhitelistEntryOrBuilder
getWhitelistEntryOrBuilder(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
java.util.List<? extends Requirement.WhitelistEntryOrBuilder>
getWhitelistEntryOrBuilderList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
java.util.List<java.lang.String>
getWhitelistList()
Optional: A list of source path prefixes that are exempt from the requirement.java.lang.String
getWhitelistRegexp(int index)
Optional: A list of source paths regexs that are exempt from the requirement.com.google.protobuf.ByteString
getWhitelistRegexpBytes(int index)
Optional: A list of source paths regexs that are exempt from the requirement.int
getWhitelistRegexpCount()
Optional: A list of source paths regexs that are exempt from the requirement.java.util.List<java.lang.String>
getWhitelistRegexpList()
Optional: A list of source paths regexs that are exempt from the requirement.boolean
hasAllowExtendingValue()
Whether to allow subconfigs to extend the "value" field.boolean
hasErrorMessage()
Required: The message to report when a requirement is violated.boolean
hasExtends()
Allows extending whitelists of rules with the specified rule_id.boolean
hasJavaClass()
For "custom" requirements, the Java class used to enforce the requirement.boolean
hasReportLooseTypeViolations()
Whether to report possible violations when type information is not exact.boolean
hasRuleId()
Gives the rule an unique ID that can be used for extending in other rules through 'extends'.boolean
hasSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
boolean
hasType()
Required: The type of requirement.boolean
hasTypeMatchingStrategy()
Strategy to use for matching types in the value parameter (e.g.-
Methods inherited from interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder
getDefaultInstanceForType, getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, hasExtension, hasExtension, hasExtension
-
-
-
-
Method Detail
-
hasErrorMessage
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;
- Returns:
- Whether the errorMessage field is set.
-
getErrorMessage
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;
- Returns:
- The errorMessage.
-
getErrorMessageBytes
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;
- Returns:
- The bytes for errorMessage.
-
getWhitelistList
java.util.List<java.lang.String> getWhitelistList()
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;
- Returns:
- A list containing the whitelist.
-
getWhitelistCount
int getWhitelistCount()
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;
- Returns:
- The count of whitelist.
-
getWhitelist
java.lang.String getWhitelist(int index)
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;
- Parameters:
index
- The index of the element to return.- Returns:
- The whitelist at the given index.
-
getWhitelistBytes
com.google.protobuf.ByteString getWhitelistBytes(int index)
Optional: A list of source path prefixes that are exempt from the requirement.
repeated string whitelist = 2;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the whitelist at the given index.
-
getWhitelistRegexpList
java.util.List<java.lang.String> getWhitelistRegexpList()
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;
- Returns:
- A list containing the whitelistRegexp.
-
getWhitelistRegexpCount
int getWhitelistRegexpCount()
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;
- Returns:
- The count of whitelistRegexp.
-
getWhitelistRegexp
java.lang.String getWhitelistRegexp(int index)
Optional: A list of source paths regexs that are exempt from the requirement.
repeated string whitelist_regexp = 3;
- Parameters:
index
- The index of the element to return.- Returns:
- The whitelistRegexp at the given index.
-
getWhitelistRegexpBytes
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;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the whitelistRegexp at the given index.
-
getWhitelistEntryList
java.util.List<Requirement.WhitelistEntry> getWhitelistEntryList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
-
getWhitelistEntry
Requirement.WhitelistEntry getWhitelistEntry(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
-
getWhitelistEntryCount
int getWhitelistEntryCount()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
-
getWhitelistEntryOrBuilderList
java.util.List<? extends Requirement.WhitelistEntryOrBuilder> getWhitelistEntryOrBuilderList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
-
getWhitelistEntryOrBuilder
Requirement.WhitelistEntryOrBuilder getWhitelistEntryOrBuilder(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
-
getOnlyApplyToList
java.util.List<java.lang.String> getOnlyApplyToList()
Optional: A list of source paths that will be checked for the requirement (the opposite of whitelist).
repeated string only_apply_to = 4;
- Returns:
- A list containing the onlyApplyTo.
-
getOnlyApplyToCount
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;
- Returns:
- The count of onlyApplyTo.
-
getOnlyApplyTo
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;
- Parameters:
index
- The index of the element to return.- Returns:
- The onlyApplyTo at the given index.
-
getOnlyApplyToBytes
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;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the onlyApplyTo at the given index.
-
getOnlyApplyToRegexpList
java.util.List<java.lang.String> 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;
- Returns:
- A list containing the onlyApplyToRegexp.
-
getOnlyApplyToRegexpCount
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;
- Returns:
- The count of onlyApplyToRegexp.
-
getOnlyApplyToRegexp
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;
- Parameters:
index
- The index of the element to return.- Returns:
- The onlyApplyToRegexp at the given index.
-
getOnlyApplyToRegexpBytes
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;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the onlyApplyToRegexp at the given index.
-
hasType
boolean hasType()
Required: The type of requirement.
optional .jscomp.Requirement.Type type = 6;
- Returns:
- Whether the type field is set.
-
getType
Requirement.Type getType()
Required: The type of requirement.
optional .jscomp.Requirement.Type type = 6;
- Returns:
- The type.
-
getValueList
java.util.List<java.lang.String> 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;
- Returns:
- A list containing the value.
-
getValueCount
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;
- Returns:
- The count of value.
-
getValue
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;
- Parameters:
index
- The index of the element to return.- Returns:
- The value at the given index.
-
getValueBytes
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;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the value at the given index.
-
hasAllowExtendingValue
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;
- Returns:
- Whether the allowExtendingValue field is set.
-
getAllowExtendingValue
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;
- Returns:
- The allowExtendingValue.
-
hasTypeMatchingStrategy
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];
- Returns:
- Whether the typeMatchingStrategy field is set.
-
getTypeMatchingStrategy
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];
- Returns:
- The typeMatchingStrategy.
-
hasJavaClass
boolean hasJavaClass()
For "custom" requirements, the Java class used to enforce the requirement. Ignored otherwise.
optional string java_class = 8;
- Returns:
- Whether the javaClass field is set.
-
getJavaClass
java.lang.String getJavaClass()
For "custom" requirements, the Java class used to enforce the requirement. Ignored otherwise.
optional string java_class = 8;
- Returns:
- The javaClass.
-
getJavaClassBytes
com.google.protobuf.ByteString getJavaClassBytes()
For "custom" requirements, the Java class used to enforce the requirement. Ignored otherwise.
optional string java_class = 8;
- Returns:
- The bytes for javaClass.
-
hasRuleId
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;
- Returns:
- Whether the ruleId field is set.
-
getRuleId
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;
- Returns:
- The ruleId.
-
getRuleIdBytes
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;
- Returns:
- The bytes for ruleId.
-
hasExtends
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;
- Returns:
- Whether the extends field is set.
-
getExtends
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;
- Returns:
- The extends.
-
getExtendsBytes
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;
- Returns:
- The bytes for extends.
-
hasReportLooseTypeViolations
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];
- Returns:
- Whether the reportLooseTypeViolations field is set.
-
getReportLooseTypeViolations
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];
- Returns:
- The reportLooseTypeViolations.
-
hasSeverity
boolean hasSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
- Returns:
- Whether the severity field is set.
-
getSeverity
Requirement.Severity getSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
- Returns:
- The severity.
-
getConfigFileList
java.util.List<java.lang.String> 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;
- Returns:
- A list containing the configFile.
-
getConfigFileCount
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;
- Returns:
- The count of configFile.
-
getConfigFile
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;
- Parameters:
index
- The index of the element to return.- Returns:
- The configFile at the given index.
-
getConfigFileBytes
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;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the configFile at the given index.
-
-