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 class
Requirement.Builder
A specification of code requirements NEXT ID: 17static class
Requirement.Severity
With what severity to report the issue by default.static class
Requirement.Type
A classification of the requirement and how it is enforced.static class
Requirement.TypeMatchingStrategy
Protobuf enumjscomp.Requirement.TypeMatchingStrategy
static class
Requirement.WhitelistEntry
Protobuf typejscomp.Requirement.WhitelistEntry
static interface
Requirement.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 int
ALLOW_EXTENDING_VALUE_FIELD_NUMBER
static int
CONFIG_FILE_FIELD_NUMBER
static int
ERROR_MESSAGE_FIELD_NUMBER
static int
EXTENDS_FIELD_NUMBER
static int
JAVA_CLASS_FIELD_NUMBER
static int
ONLY_APPLY_TO_FIELD_NUMBER
static int
ONLY_APPLY_TO_REGEXP_FIELD_NUMBER
static com.google.protobuf.Parser<Requirement>
PARSER
Deprecated.static int
REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER
static int
RULE_ID_FIELD_NUMBER
static int
SEVERITY_FIELD_NUMBER
static int
TYPE_FIELD_NUMBER
static int
TYPE_MATCHING_STRATEGY_FIELD_NUMBER
static int
VALUE_FIELD_NUMBER
static int
WHITELIST_ENTRY_FIELD_NUMBER
static int
WHITELIST_FIELD_NUMBER
static int
WHITELIST_REGEXP_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
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.com.google.protobuf.ProtocolStringList
getConfigFileList()
The file(s) that defined this requirement.static Requirement
getDefaultInstance()
Requirement
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
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).com.google.protobuf.ProtocolStringList
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).com.google.protobuf.ProtocolStringList
getOnlyApplyToRegexpList()
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()
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'.int
getSerializedSize()
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.com.google.protobuf.UnknownFieldSet
getUnknownFields()
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.com.google.protobuf.ProtocolStringList
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;
com.google.protobuf.ProtocolStringList
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.com.google.protobuf.ProtocolStringList
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.int
hashCode()
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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Requirement.Builder
newBuilder()
static Requirement.Builder
newBuilder(Requirement prototype)
Requirement.Builder
newBuilderForType()
protected Requirement.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected java.lang.Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Requirement
parseDelimitedFrom(java.io.InputStream input)
static Requirement
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Requirement
parseFrom(byte[] data)
static Requirement
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Requirement
parseFrom(com.google.protobuf.ByteString data)
static Requirement
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Requirement
parseFrom(com.google.protobuf.CodedInputStream input)
static Requirement
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Requirement
parseFrom(java.io.InputStream input)
static Requirement
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Requirement
parseFrom(java.nio.ByteBuffer data)
static Requirement
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Requirement>
parser()
Requirement.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getUnknownFields
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
hasErrorMessage
in 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:
getErrorMessage
in 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:
getErrorMessageBytes
in 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:
getWhitelistList
in 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:
getWhitelistCount
in 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:
getWhitelist
in 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:
getWhitelistBytes
in 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:
getWhitelistRegexpList
in 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:
getWhitelistRegexpCount
in 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:
getWhitelistRegexp
in 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:
getWhitelistRegexpBytes
in 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:
getWhitelistEntryList
in interfaceRequirementOrBuilder
-
getWhitelistEntryOrBuilderList
public java.util.List<? extends Requirement.WhitelistEntryOrBuilder> getWhitelistEntryOrBuilderList()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
- Specified by:
getWhitelistEntryOrBuilderList
in interfaceRequirementOrBuilder
-
getWhitelistEntryCount
public int getWhitelistEntryCount()
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
- Specified by:
getWhitelistEntryCount
in interfaceRequirementOrBuilder
-
getWhitelistEntry
public Requirement.WhitelistEntry getWhitelistEntry(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
- Specified by:
getWhitelistEntry
in interfaceRequirementOrBuilder
-
getWhitelistEntryOrBuilder
public Requirement.WhitelistEntryOrBuilder getWhitelistEntryOrBuilder(int index)
repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
- Specified by:
getWhitelistEntryOrBuilder
in 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:
getOnlyApplyToList
in 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:
getOnlyApplyToCount
in 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:
getOnlyApplyTo
in 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:
getOnlyApplyToBytes
in 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:
getOnlyApplyToRegexpList
in 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:
getOnlyApplyToRegexpCount
in 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:
getOnlyApplyToRegexp
in 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:
getOnlyApplyToRegexpBytes
in 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:
hasType
in 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:
getType
in 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:
getValueList
in 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:
getValueCount
in 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:
getValue
in 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:
getValueBytes
in 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:
hasAllowExtendingValue
in 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:
getAllowExtendingValue
in 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:
hasTypeMatchingStrategy
in 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:
getTypeMatchingStrategy
in 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:
hasJavaClass
in 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:
getJavaClass
in 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:
getJavaClassBytes
in 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:
hasRuleId
in 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:
getRuleId
in 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:
getRuleIdBytes
in 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:
hasExtends
in 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:
getExtends
in 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:
getExtendsBytes
in 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:
hasReportLooseTypeViolations
in 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:
getReportLooseTypeViolations
in interfaceRequirementOrBuilder
- Returns:
- The reportLooseTypeViolations.
-
hasSeverity
public boolean hasSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
- Specified by:
hasSeverity
in interfaceRequirementOrBuilder
- Returns:
- Whether the severity field is set.
-
getSeverity
public Requirement.Severity getSeverity()
optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
- Specified by:
getSeverity
in 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:
getConfigFileList
in 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:
getConfigFileCount
in 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:
getConfigFile
in 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:
getConfigFileBytes
in 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:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.ExtendableMessage<Requirement>
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Requirement.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Requirement getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<Requirement>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-