Class AllowedScope
java.lang.Object
io.micronaut.errorprone.noreflection.AllowedScope
A class or a package in which reflection is allowed, as a build names it, with the only categories allowed there
when not all of them are.
com.example.ReflectionAccess- any reflection in the class, and in the classes and lambdas nested in itcom.example.Outer.Innerorcom.example.Outer$Inner- in a nested classcom.example.internal.*- in any class of the package, or of a package below itcom.example.Handles:HANDLES+PROXY- only those categories, in the class
- Since:
- 1.0.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallows(ReflectionCategory category) booleancoversClass(String qualifiedName, String flatName) booleancoversPackage(String packageName) static AllowedScopescope()toFlag()toString()
-
Method Details
-
parse
- Parameters:
text- The scope- Returns:
- The scope parsed
- Throws:
IllegalArgumentException- When it is not a scope or names an unknown category, saying why
-
scope
- Returns:
- The class, or the package followed by
.*, without the categories
-
categories
- Returns:
- The categories allowed, all of them when empty
-
allows
- Parameters:
category- A category- Returns:
- Whether it is allowed in the scope
-
coversClass
-
coversPackage
- Parameters:
packageName- The name of a package- Returns:
- Whether the scope is that package or a package above it
-
toFlag
- Returns:
- The scope as the flag of the checks takes it
-
toString
-