Uses of Class
com.google.errorprone.ClassName
Packages that use ClassName
Package
Description
Checks added to the java compiler which detect common bug patterns.
Support code for providing automated corrections for defects we find.
A predicate DSL for matching javac AST nodes.
Supports matchers, but rather than giving Matcher implementations which are predicates on
individual AST nodes, a supplier gives contextual information from the traversal of the AST.
Utility code.
-
Uses of ClassName in com.google.errorprone
Methods in com.google.errorprone that return ClassName -
Uses of ClassName in com.google.errorprone.bugpatterns
Methods in com.google.errorprone.bugpatterns that return ClassNameModifier and TypeMethodDescriptionprotected ClassNameJUnit4SetUpNotRun.correctAnnotation()protected ClassNameJUnit4TearDownNotRun.correctAnnotation() -
Uses of ClassName in com.google.errorprone.fixes
Methods in com.google.errorprone.fixes with parameters of type ClassNameModifier and TypeMethodDescriptionAdd an import statement forclassNameas part of this SuggestedFix.SuggestedFix.Builder.addStaticImport(ClassName className, String memberName) Add a static import statement formemberNameonclassNameas part of this SuggestedFix.static StringSuggestedFixes.qualifyStaticImport(ClassName className, String memberName, SuggestedFix.Builder fix, VisitorState state) Provides a name to use for the static membermemberNameonclassName, trying to static import it if possible.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, ClassName typeName) Returns a human-friendly name of the giventypeNamefor use in fixes.SuggestedFix.Builder.removeImport(ClassName className) Remove an import statement forclassNameas part of this SuggestedFix.SuggestedFix.Builder.removeStaticImport(ClassName className, String memberName) Remove a static import statement formemberNameonclassNameas part of this SuggestedFix.static Optional<SuggestedFix> SuggestedFixes.suggestExemptingAnnotation(ClassName exemptingAnnotation, TreePath where, VisitorState state) Create a fix to add a suppression annotation on the surrounding class. -
Uses of ClassName in com.google.errorprone.matchers
Fields in com.google.errorprone.matchers declared as ClassNameModifier and TypeFieldDescriptionstatic final ClassNameProtobufMatchers.ABSTRACT_MESSAGE_LITEstatic final ClassNameInjectMatchers.ASSISTED_ANNOTATIONstatic final ClassNameInjectMatchers.ASSISTED_INJECT_ANNOTATIONstatic final ClassNameProtobufMatchers.BYTE_STRINGstatic final ClassNameInjectMatchers.DAGGER_COMPONENT_BUILDER_ANNOTATIONstatic final ClassNameInjectMatchers.DAGGER_MAP_KEY_ANNOTATIONstatic final ClassNameInjectMatchers.DAGGER_PRODUCES_ANNOTATIONstatic final ClassNameInjectMatchers.DAGGER_PRODUCTION_COMPONENT_BUILDER_ANNOTATIONstatic final ClassNameInjectMatchers.DAGGER_PRODUCTION_SUBCOMPONENT_BUILDER_ANNOTATIONstatic final ClassNameInjectMatchers.DAGGER_PROVIDES_ANNOTATIONstatic final ClassNameInjectMatchers.DAGGER_SUBCOMPONENT_BUILDER_ANNOTATIONstatic final ClassNameProtobufMatchers.DESCRIPTORstatic final ClassNameProtobufMatchers.DYNAMIC_MESSAGEstatic final ClassNameProtobufMatchers.ENUM_DESCRIPTORstatic final ClassNameProtobufMatchers.ENUM_LITEstatic final ClassNameProtobufMatchers.ENUM_VALUE_DESCRIPTORstatic final ClassNameProtobufMatchers.EXTENDABLE_MESSAGEstatic final ClassNameProtobufMatchers.EXTENDABLE_MESSAGE_LITEstatic final ClassNameProtobufMatchers.EXTENSIONstatic final ClassNameProtobufMatchers.EXTENSION_LITEstatic final ClassNameProtobufMatchers.FIELD_DESCRIPTORstatic final ClassNameProtobufMatchers.FILE_DESCRIPTORstatic final ClassNameProtobufMatchers.GENERATED_MESSAGEstatic final ClassNameProtobufMatchers.GENERATED_MESSAGE_BUILDERstatic final ClassNameProtobufMatchers.GENERATED_MESSAGE_LITEstatic final ClassNameProtobufMatchers.GENERATED_MESSAGE_LITE_BUILDERstatic final ClassNameInjectMatchers.GUICE_ABSTRACT_MODULEstatic final ClassNameInjectMatchers.GUICE_BIND_ANNOTATIONstatic final ClassNameInjectMatchers.GUICE_BINDING_ANNOTATIONstatic final ClassNameInjectMatchers.GUICE_INJECT_ANNOTATIONstatic final ClassNameInjectMatchers.GUICE_MAP_KEY_ANNOTATIONstatic final ClassNameInjectMatchers.GUICE_MODULEstatic final ClassNameInjectMatchers.GUICE_PROVIDES_ANNOTATIONstatic final ClassNameInjectMatchers.GUICE_SCOPE_ANNOTATIONstatic final ClassNameProtobufMatchers.INTERNAL_ONE_OF_ENUMstatic final ClassNameInjectMatchers.JAKARTA_INJECT_ANNOTATIONstatic final ClassNameInjectMatchers.JAVAX_INJECT_ANNOTATIONstatic final ClassNameInjectMatchers.JAVAX_QUALIFIER_ANNOTATIONstatic final ClassNameInjectMatchers.JAVAX_SCOPE_ANNOTATIONstatic final ClassNameRegexMatchers.JDK_MATCHER_CLASSstatic final ClassNameRegexMatchers.JDK_PATTERN_CLASSstatic final ClassNameJUnitMatchers.JUNIT_AFTER_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT_AFTER_CLASS_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT_BEFORE_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT_BEFORE_CLASS_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT3_ASSERTstatic final ClassNameJUnitMatchers.JUNIT3_TEST_CASEstatic final ClassNameJUnitMatchers.JUNIT4_ASSERTstatic final ClassNameJUnitMatchers.JUNIT4_DATA_POINTS_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_IGNORE_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_PARAMETERIZED_CLASSstatic final ClassNameJUnitMatchers.JUNIT4_PARAMETERIZED_PARAMETER_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_PARAMETERIZED_PARAMETERS_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_RULE_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_RUN_WITH_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_RUNNER_CLASSstatic final ClassNameJUnitMatchers.JUNIT4_TEST_ANNOTATIONstatic final ClassNameJUnitMatchers.JUNIT4_THEORY_ANNOTATIONstatic final ClassNameProtobufMatchers.MESSAGEstatic final ClassNameProtobufMatchers.MESSAGE_BUILDERstatic final ClassNameProtobufMatchers.MESSAGE_LITEstatic final ClassNameProtobufMatchers.MESSAGE_LITE_BUILDERstatic final ClassNameProtobufMatchers.MESSAGE_LITE_OR_BUILDERstatic final ClassNameProtobufMatchers.MESSAGE_OR_BUILDERstatic final ClassNameProtobufMatchers.MUTABLE_MESSAGE_LITEstatic final ClassNameProtobufMatchers.ONEOF_DESCRIPTORstatic final ClassNameProtobufMatchers.PROTO_DURATIONstatic final ClassNameProtobufMatchers.PROTO_DURATIONS_UTILstatic final ClassNameProtobufMatchers.PROTO_FIELD_MASK_UTILstatic final ClassNameProtobufMatchers.PROTO_TIMESTAMPstatic final ClassNameProtobufMatchers.PROTO_TIMESTAMPS_UTILstatic final ClassNameProtobufMatchers.PROTOCOL_MESSAGE_ENUMstatic final ClassNameProtobufMatchers.PROTOCOL_STRING_LISTstatic final ClassNameRegexMatchers.RE2J_MATCHER_CLASSstatic final ClassNameRegexMatchers.RE2J_PATTERN_CLASSstatic final ClassNameRegexMatchers.SAFERE_CROSSCHECK_MATCHER_CLASSstatic final ClassNameRegexMatchers.SAFERE_MATCHER_CLASSstatic final ClassNameRegexMatchers.SAFERE_PATTERN_CLASSstatic final ClassNameProtobufMatchers.SERVICE_DESCRIPTORstatic final ClassNameProtobufMatchers.UNKNOWN_FIELD_SETFields in com.google.errorprone.matchers with type parameters of type ClassNameModifier and TypeFieldDescriptionstatic final com.google.common.collect.ImmutableSet<ClassName> RegexMatchers.ALL_MATCHER_CLASSESAll supported regular expressionMatcherclasses.static final com.google.common.collect.ImmutableSet<ClassName> RegexMatchers.ALL_PATTERN_CLASSESAll supported regular expressionPatternclasses.static final com.google.common.collect.ImmutableSet<ClassName> RegexMatchers.NON_CLOSEABLE_PATTERN_CLASSESImmutablePatternclasses that do not hold closeable native resources.static final com.google.common.collect.ImmutableSet<ClassName> InjectMatchers.QUALIFIER_ANNOTATIONSstatic final com.google.common.collect.ImmutableSet<ClassName> InjectMatchers.SCOPE_ANNOTATIONSMethods in com.google.errorprone.matchers with parameters of type ClassNameModifier and TypeMethodDescriptionstatic Matcher<MethodTree> Matchers.constructorOfClass(ClassName className) Matches a constructor declaration in a specific enclosing class.Matchers.hasAnnotation(ClassName annotationClass) Determines whether an expression has an annotation of the given type.static Matcher<MethodTree> Matchers.hasAnnotationOnAnyOverriddenMethod(ClassName annotationClass) Matches if a method or any method it overrides has an annotation of the given type.Matchers.hasAnyAnnotation(ClassName... annotations) Determines whether a tree has any of the given annotations.static Matcher<AnnotationTree> Matchers.hasMetaAnnotation(ClassName annotationClassName) Matches an annotation that is itself annotated with the given annotation, i.e. a meta-annotation.Matchers.isDirectImplementationOf(ClassName clazz) Matches any node that is directly an implementation, but not extension, of the given Class.Matchers.isExtensionOf(ClassName clazz) Matches any node that is a direct extension of the given class.Matchers.isSameType(ClassName className) Matches an AST node if it has the same erased type as the given class.Matchers.isSubtypeOf(ClassName className) Matches an AST node if its type is a subtype of the given class.static Matcher<AnnotationTree> Matches anAnnotationTreewith the given annotationClassName.static Matcher<MethodTree> Matchers.methodReturns(ClassName returnType) Match a method whose return type equals the givenreturnType.static Matcher<MethodTree> Matchers.methodWithClassAndName(ClassName className, String methodName) Match a method declaration with a specific enclosing class and method name.Matchers.symbolHasAnnotation(ClassName annotationClass) Determines whether an expression refers to a symbol that has an annotation of the given type.Method parameters in com.google.errorprone.matchers with type arguments of type ClassNameModifier and TypeMethodDescriptionMatchers.hasAnyAnnotationOf(Iterable<ClassName> annotations) Determines whether a tree has any of the given annotations.static Matcher<ExpressionTree> JUnitMatchers.isJUnit4TestRunnerOfClasses(Iterable<ClassName> runnerTypes) Matches an argument of typeClass<T>, whereTis a subtype of one of the givenrunnerTypes.Constructors in com.google.errorprone.matchers with parameters of type ClassNameModifierConstructorDescriptionAnnotationType(ClassName annotationClass) Matches anAnnotationTreewith the given annotationClassName. -
Uses of ClassName in com.google.errorprone.matchers.field
Methods in com.google.errorprone.matchers.field with parameters of type ClassNameModifier and TypeMethodDescription -
Uses of ClassName in com.google.errorprone.matchers.method
Methods in com.google.errorprone.matchers.method with parameters of type ClassNameModifier and TypeMethodDescriptionDeprecated.Match on the given class exactly.Deprecated.Match on the given class exactly.Deprecated.Match on the given class exactly.MethodMatchers.StaticMethodMatcher.onClassAny(ClassName... classNames) Deprecated.Match on types that are equal to any of the given classes.MethodMatchers.AnyMethodMatcher.onDescendantOf(ClassName className) Deprecated.Match on descendants of the given class.MethodMatchers.InstanceMethodMatcher.onDescendantOf(ClassName className) Deprecated.Match on descendants of the given class.MethodMatchers.StaticMethodMatcher.onDescendantOf(ClassName className) Deprecated.Match on descendants of the given class.MethodMatchers.AnyMethodMatcher.onDescendantOfAny(ClassName... classTypes) Deprecated.Match on types that are descendants of any of the given classes.MethodMatchers.InstanceMethodMatcher.onDescendantOfAny(ClassName... classTypes) Deprecated.Match on types that are descendants of any of the given classes.MethodMatchers.StaticMethodMatcher.onDescendantOfAny(ClassName... classTypes) Deprecated.Match on types that are descendants of any of the given classes.MethodMatchers.InstanceMethodMatcher.onExactClass(ClassName className) Deprecated.Match on the given class exactly.MethodMatchers.InstanceMethodMatcher.onExactClassAny(ClassName... classTypes) Deprecated.Match on types that are exactly the same as any of the given classes.MethodMatchers.ConstructorClassMatcher.withParametersOfType(ClassName first, ClassName... rest) Deprecated.Match constructors whose formal parameters have the given types.MethodMatchers.MethodNameMatcher.withParametersOfType(ClassName first, ClassName... rest) Deprecated.Match methods whose formal parameters have the given types. -
Uses of ClassName in com.google.errorprone.predicates
Methods in com.google.errorprone.predicates with parameters of type ClassNameModifier and TypeMethodDescriptionstatic TypePredicateTypePredicates.hasAnnotation(ClassName annotationType) Match types that are annotated with the given annotation.static TypePredicateTypePredicates.isDescendantOf(ClassName type) Match sub-types of the given type.static TypePredicateTypePredicates.isDescendantOfAny(ClassName... types) Match types that are a sub-type of one of the given types.static TypePredicateTypePredicates.isExactType(ClassName type) Match types that are exactly equal.static TypePredicateTypePredicates.isExactTypeAny(ClassName... types) Match types that are exactly equal to any of the given types.Method parameters in com.google.errorprone.predicates with type arguments of type ClassNameModifier and TypeMethodDescriptionstatic TypePredicateTypePredicates.isDescendantOfAnyOf(Iterable<ClassName> types) Match types that are a sub-type of one of the given classes.static TypePredicateTypePredicates.isExactTypeAnyOf(Iterable<ClassName> types) Match types that are exactly equal to any of the given classes. -
Uses of ClassName in com.google.errorprone.suppliers
Methods in com.google.errorprone.suppliers with parameters of type ClassName -
Uses of ClassName in com.google.errorprone.util
Fields in com.google.errorprone.util declared as ClassNameModifier and TypeFieldDescriptionstatic final ClassNameAnnotationNames.AFTER_TEMPLATE_ANNOTATIONstatic final ClassNameAnnotationNames.AUTO_BUILDER_ANNOTATIONstatic final ClassNameAnnotationNames.AUTO_FACTORY_ANNOTATIONstatic final ClassNameAnnotationNames.AUTO_ONE_OF_ANNOTATIONstatic final ClassNameAnnotationNames.AUTO_VALUE_ANNOTATIONstatic final ClassNameAnnotationNames.AUTO_VALUE_BUILDER_ANNOTATIONstatic final ClassNameAnnotationNames.BEFORE_TEMPLATE_ANNOTATIONstatic final ClassNameAnnotationNames.BUG_PATTERN_ANNOTATIONstatic final ClassNameAnnotationNames.CAN_IGNORE_RETURN_VALUE_ANNOTATIONstatic final ClassNameAnnotationNames.CHECK_RETURN_VALUE_ANNOTATIONstatic final ClassNameAnnotationNames.COMPATIBLE_WITH_ANNOTATIONstatic final ClassNameAnnotationNames.COMPILE_TIME_CONSTANT_ANNOTATIONstatic final ClassNameAnnotationNames.DEPRECATED_ANNOTATIONstatic final ClassNameAnnotationNames.DO_NOT_CALL_ANNOTATIONstatic final ClassNameAnnotationNames.FOR_OVERRIDE_ANNOTATIONstatic final ClassNameAnnotationNames.FORMAT_METHOD_ANNOTATIONstatic final ClassNameAnnotationNames.FORMAT_STRING_ANNOTATIONstatic final ClassNameAnnotationNames.IMMUTABLE_ANNOTATIONstatic final ClassNameAnnotationNames.INCOMPATIBLE_MODIFIERS_ANNOTATIONstatic final ClassNameAnnotationNames.INLINE_ME_ANNOTATIONstatic final ClassNameAnnotationNames.INLINE_ME_VALIDATION_DISABLED_ANNOTATIONstatic final ClassNameAnnotationNames.KOTLIN_METADATA_ANNOTATIONstatic final ClassNameAnnotationNames.LAZY_INIT_ANNOTATIONstatic final ClassNameAnnotationNames.LENIENT_FORMAT_STRING_ANNOTATIONstatic final ClassNameAnnotationNames.MATCHES_ANNOTATIONstatic final ClassNameAnnotationNames.MUST_BE_CLOSED_ANNOTATIONstatic final ClassNameAnnotationNames.NOT_MATCHES_ANNOTATIONstatic final ClassNameAnnotationNames.NULL_MARKED_ANNOTATIONstatic final ClassNameAnnotationNames.NULL_UNMARKED_ANNOTATIONstatic final ClassNameAnnotationNames.OF_KIND_ANNOTATIONstatic final ClassNameAnnotationNames.OVERRIDE_ANNOTATIONstatic final ClassNameAnnotationNames.PLACEHOLDER_ANNOTATIONstatic final ClassNameAnnotationNames.REPEATABLE_ANNOTATIONstatic final ClassNameAnnotationNames.REPEATED_ANNOTATIONstatic final ClassNameAnnotationNames.REQUIRED_MODIFIERS_ANNOTATIONstatic final ClassNameAnnotationNames.RESTRICT_TO_ANNOTATIONstatic final ClassNameAnnotationNames.RESTRICTED_API_ANNOTATIONstatic final ClassNameAnnotationNames.RETENTION_ANNOTATIONstatic final ClassNameAnnotationNames.SUPPRESS_WARNINGS_ANNOTATIONstatic final ClassNameAnnotationNames.TARGET_ANNOTATIONstatic final ClassNameAnnotationNames.THREAD_SAFE_ANNOTATIONstatic final ClassNameAnnotationNames.VAR_ANNOTATIONMethods in com.google.errorprone.util with parameters of type ClassNameModifier and TypeMethodDescriptionstatic Optional<com.sun.tools.javac.code.Attribute.Compound> MoreAnnotations.getAnnotation(Element sym, ClassName annotationName) Returns the annotation on the given element with the specified class name.MoreAnnotations.getBooleanValue(Element sym, ClassName annotationName) Shorthand for extracting the "value" boolean of a named annotation on an element.static Optional<com.sun.tools.javac.code.Symbol.VarSymbol> MoreAnnotations.getEnumValue(Element sym, ClassName annotationName) Shorthand for extracting the "value" enum of a named annotation on an element.static com.google.common.collect.ImmutableList<com.sun.tools.javac.code.Symbol.VarSymbol> MoreAnnotations.getEnumValues(Element sym, ClassName annotationName) Shorthand for extracting the "value" enum values of a named annotation on an element.static com.google.common.collect.ImmutableList<String> MoreAnnotations.getStrings(Element sym, ClassName annotationName) Shorthand for extracting a list of strings from the "value" element of a named annotation on an element.MoreAnnotations.getStringValue(Element sym, ClassName annotationName) Shorthand for extracting the "value" string of a named annotation on an element.static com.google.common.collect.ImmutableList<TypeMirror> Shorthand for extracting a list of types from the "value" element of a named annotation on an element.static Optional<TypeMirror> MoreAnnotations.getTypeValue(Element sym, ClassName annotationName) Shorthand for extracting the "value" type of a named annotation on an element.static booleanASTHelpers.hasAnnotation(@Nullable Tree tree, ClassName annotationClass, VisitorState state) Check for the presence of an annotation, considering annotation inheritance.static booleanASTHelpers.hasAnnotation(@Nullable com.sun.tools.javac.code.Symbol sym, ClassName annotationClass, VisitorState state) Determines whether a symbol has an annotation of the given type.static booleanASTHelpers.hasDirectAnnotation(@Nullable com.sun.tools.javac.code.Symbol sym, ClassName annotationClass) Check for the presence of an annotation with the given class name directly on this symbol or its type.static booleanASTHelpers.isSameType(com.sun.tools.javac.code.Type s, ClassName t, VisitorState state) Returns true iferasure(s) == erasure(t).static booleanASTHelpers.isSubtype(com.sun.tools.javac.code.Type s, ClassName t, VisitorState state) Returns true iferasure(s) <: erasure(t).