Class CallPattern
java.lang.Object
io.micronaut.errorprone.noreflection.CallPattern
Calls named the way a build writes them: a type or a package, then
# and the members.
java.lang.Class#getSimpleName- a method of the class, whatever its parametersjava.lang.Class#getSimpleName|getCanonicalName- either of the twojava.util.EnumMap#<init>- the constructors of the classjava.util.EnumSet#*, orjava.util.EnumSetalone - any method or constructor of itio.micronaut.core.reflect.ReflectionUtils#*-getWrapperType|getPrimitiveType- any but thosejava.lang.reflect.AnnotatedElement+#getAnnotation- declared by the type or by a subtype of itjava.lang.invoke.*#*- of a type of the package, or of a package below it
A nested type is named either way, java.util.ServiceLoader.Provider or
java.util.ServiceLoader$Provider. A pattern holds names only; the checks match it against the method the
compiler resolved a call, a method reference or a constructor to.
- Since:
- 1.0.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the type of a pattern is matched against the class declaring a member. -
Method Summary
Modifier and TypeMethodDescriptionbooleancoversPackage(String packageName) booleanmatchesMember(String name) booleanowner()static CallPatterntoString()
-
Method Details
-
parse
- Parameters:
text- The pattern- Returns:
- The pattern parsed
- Throws:
IllegalArgumentException- When it is not a pattern, saying why and what one looks like
-
owner
- Returns:
- The type or package named
-
ownerMatch
- Returns:
- How the type is matched
-
matchesMember
- Parameters:
name- The simple name of a method, or<init>- Returns:
- Whether the pattern names it
-
namesType
-
coversPackage
- Parameters:
packageName- The name of a package- Returns:
- Whether it is the package the pattern names or a package below it
-
toString
-