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
Nested ClassesModifier and TypeClassDescriptionstatic final classOptions to use to analyze if invoking aMemberrequires privileged access. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanalyze(Member member, ProtectedAccess.Options options) voidanalyze(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, ornullif none is required.booleanisAccessible(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:
trueif 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, ornullif 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
-