Class ProtectedAccess
java.lang.Object
org.springframework.aot.generator.ProtectedAccess
Gather the need of non-public access and determine the privileged package
to use, if necessary.
- Since:
- 6.0
- Author:
- Stephane Nicoll
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Options to use to analyze if invoking aMember
requires privileged access. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
analyze
(Member member, ProtectedAccess.Options options) void
analyze
(ResolvableType type) Analyze the specified type, including its full type signature.getPrivilegedPackageName
(String packageName) Return the privileged package name to use for the specified package name, ornull
if none is required.boolean
isAccessible
(String packageName) Specify whether the protected elements registered in this instance are accessible from the specified package name.
-
Constructor Details
-
ProtectedAccess
public ProtectedAccess()
-
-
Method Details
-
isAccessible
Specify whether the protected elements registered in this instance are accessible from the specified package name.- Parameters:
packageName
- the target package name- Returns:
true
if the registered access can be safely used from the specified package name
-
getPrivilegedPackageName
@Nullable public String getPrivilegedPackageName(String packageName) throws ProtectedAccessException Return the privileged package name to use for the specified package name, ornull
if none is required.- Parameters:
packageName
- the target package name to use- Returns:
- the privileged package name to use, or
null
- Throws:
ProtectedAccessException
- if a single privileged package cannot be identified- See Also:
-
analyze
Analyze the specified type, including its full type signature.- Parameters:
type
- the type to analyze
-
analyze
- Parameters:
member
- the member to analyzeoptions
- the options to use
-