Enum ThirdPartyLibrary
- All Implemented Interfaces:
Serializable,Comparable<ThirdPartyLibrary>,java.lang.constant.Constable
Utility class that helps decide whether it is appropriate to introduce references to (well-known)
third-party libraries.
This class should be used by BugCheckers that may otherwise suggest the introduction
of code that depends on possibly-not-present third-party libraries.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAssertJ.Google's Guava.New Relic's Java agent API.VMWare's Project Reactor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisIntroductionAllowed(com.google.errorprone.VisitorState state) Tells whether it is okay to introduce a dependency on this well-known third party library in the given context.static ThirdPartyLibraryReturns the enum constant of this type with the specified name.static ThirdPartyLibrary[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ASSERTJ
AssertJ.- See Also:
-
GUAVA
Google's Guava.- See Also:
-
NEW_RELIC_AGENT_API
New Relic's Java agent API.- See Also:
-
REACTOR
VMWare's Project Reactor.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isIntroductionAllowed
public boolean isIntroductionAllowed(com.google.errorprone.VisitorState state) Tells whether it is okay to introduce a dependency on this well-known third party library in the given context.- Parameters:
state- The context under consideration.- Returns:
trueiff it is okay to assume or create a dependency on this library.
-