public static enum Requirement.Type extends Enum<Requirement.Type> implements com.google.protobuf.ProtocolMessageEnum
jscomp.Requirement.Type
A classification of the requirement and how it is enforced.
Enum Constant and Description |
---|
BANNED_CODE_PATTERN
BANNED_CODE_PATTERN = 9; |
BANNED_DEPENDENCY
BANNED_DEPENDENCY = 2; |
BANNED_NAME
BANNED_NAME = 3; |
BANNED_PROPERTY
BANNED_PROPERTY = 4; |
BANNED_PROPERTY_CALL
BANNED_PROPERTY_CALL = 10; |
BANNED_PROPERTY_READ
BANNED_PROPERTY_READ = 5; |
BANNED_PROPERTY_WRITE
BANNED_PROPERTY_WRITE = 6; |
CUSTOM
CUSTOM = 1; |
RESTRICTED_METHOD_CALL
RESTRICTED_METHOD_CALL = 8; |
RESTRICTED_NAME_CALL
RESTRICTED_NAME_CALL = 7; |
Modifier and Type | Field and Description |
---|---|
static int |
BANNED_CODE_PATTERN_VALUE
BANNED_CODE_PATTERN = 9; |
static int |
BANNED_DEPENDENCY_VALUE
BANNED_DEPENDENCY = 2; |
static int |
BANNED_NAME_VALUE
BANNED_NAME = 3; |
static int |
BANNED_PROPERTY_CALL_VALUE
BANNED_PROPERTY_CALL = 10; |
static int |
BANNED_PROPERTY_READ_VALUE
BANNED_PROPERTY_READ = 5; |
static int |
BANNED_PROPERTY_VALUE
BANNED_PROPERTY = 4; |
static int |
BANNED_PROPERTY_WRITE_VALUE
BANNED_PROPERTY_WRITE = 6; |
static int |
CUSTOM_VALUE
CUSTOM = 1; |
static int |
RESTRICTED_METHOD_CALL_VALUE
RESTRICTED_METHOD_CALL = 8; |
static int |
RESTRICTED_NAME_CALL_VALUE
RESTRICTED_NAME_CALL = 7; |
Modifier and Type | Method and Description |
---|---|
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<Requirement.Type> |
internalGetValueMap() |
static Requirement.Type |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static Requirement.Type |
valueOf(int value) |
static Requirement.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Requirement.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Requirement.Type CUSTOM
CUSTOM = 1;
A requirement enforced with code a external java class.
public static final Requirement.Type BANNED_DEPENDENCY
BANNED_DEPENDENCY = 2;
A forbidden source file
public static final Requirement.Type BANNED_NAME
BANNED_NAME = 3;
A forbidden fully distinguished name. For example: - A global name like "eval" or "goog" - A namespaced value or type: namespace.Banned - A 'static' property: "namespace.Foo.banned"
public static final Requirement.Type BANNED_PROPERTY
BANNED_PROPERTY = 4;
A banned instance property, for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned"
public static final Requirement.Type BANNED_PROPERTY_READ
BANNED_PROPERTY_READ = 5;
A banned reading from an instance property, for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned" Unlike BANNED_PROPERTY, this only bans reads to the property, i.e. its use as an rvalue.
public static final Requirement.Type BANNED_PROPERTY_WRITE
BANNED_PROPERTY_WRITE = 6;
A banned write to an instance property, for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned" Unlike BANNED_PROPERTY, this only bans assignments to the property, i.e. its use as an lvalue.
public static final Requirement.Type RESTRICTED_NAME_CALL
RESTRICTED_NAME_CALL = 7;
A restricted call, for example: - the "parseInt" call must be called with a radix: parseInt:function(string, int)
public static final Requirement.Type RESTRICTED_METHOD_CALL
RESTRICTED_METHOD_CALL = 8;
A restricted call, for example: - The unsafe opt_html parameter must not be passed to createNode: goog.ui.tree.TreeControl.prototype.createNode:function()
public static final Requirement.Type BANNED_CODE_PATTERN
BANNED_CODE_PATTERN = 9;
A banned code pattern. This check is done using against an AST. To ban a call to eval: "/** @param {?} a */ function template(a) {eval(a);}"
public static final Requirement.Type BANNED_PROPERTY_CALL
BANNED_PROPERTY_CALL = 10;
A banned function call. for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned" Unlike BANNED_PROPERTY, this only bans calls to the property i.e. using the property as a value is allowed.
public static final int CUSTOM_VALUE
CUSTOM = 1;
A requirement enforced with code a external java class.
public static final int BANNED_DEPENDENCY_VALUE
BANNED_DEPENDENCY = 2;
A forbidden source file
public static final int BANNED_NAME_VALUE
BANNED_NAME = 3;
A forbidden fully distinguished name. For example: - A global name like "eval" or "goog" - A namespaced value or type: namespace.Banned - A 'static' property: "namespace.Foo.banned"
public static final int BANNED_PROPERTY_VALUE
BANNED_PROPERTY = 4;
A banned instance property, for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned"
public static final int BANNED_PROPERTY_READ_VALUE
BANNED_PROPERTY_READ = 5;
A banned reading from an instance property, for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned" Unlike BANNED_PROPERTY, this only bans reads to the property, i.e. its use as an rvalue.
public static final int BANNED_PROPERTY_WRITE_VALUE
BANNED_PROPERTY_WRITE = 6;
A banned write to an instance property, for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned" Unlike BANNED_PROPERTY, this only bans assignments to the property, i.e. its use as an lvalue.
public static final int RESTRICTED_NAME_CALL_VALUE
RESTRICTED_NAME_CALL = 7;
A restricted call, for example: - the "parseInt" call must be called with a radix: parseInt:function(string, int)
public static final int RESTRICTED_METHOD_CALL_VALUE
RESTRICTED_METHOD_CALL = 8;
A restricted call, for example: - The unsafe opt_html parameter must not be passed to createNode: goog.ui.tree.TreeControl.prototype.createNode:function()
public static final int BANNED_CODE_PATTERN_VALUE
BANNED_CODE_PATTERN = 9;
A banned code pattern. This check is done using against an AST. To ban a call to eval: "/** @param {?} a */ function template(a) {eval(a);}"
public static final int BANNED_PROPERTY_CALL_VALUE
BANNED_PROPERTY_CALL = 10;
A banned function call. for example: - An 'instance' property: "namespace.Foo.prototype.banned" - All properties of a given name "Object.prototype.banned" Unlike BANNED_PROPERTY, this only bans calls to the property i.e. using the property as a value is allowed.
public static Requirement.Type[] values()
for (Requirement.Type c : Requirement.Type.values()) System.out.println(c);
public static Requirement.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final int getNumber()
getNumber
in interface com.google.protobuf.Internal.EnumLite
getNumber
in interface com.google.protobuf.ProtocolMessageEnum
public static Requirement.Type valueOf(int value)
public static com.google.protobuf.Internal.EnumLiteMap<Requirement.Type> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface com.google.protobuf.ProtocolMessageEnum
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.ProtocolMessageEnum
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static Requirement.Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2009–2023 Google. All rights reserved.