Class ProtectedAccess

java.lang.Object
org.springframework.aot.generator.ProtectedAccess

public class ProtectedAccess extends Object
Gather the need of non-public access and determine the privileged package to use, if necessary.
Since:
6.0
Author:
Stephane Nicoll
  • Constructor Details

    • ProtectedAccess

      public ProtectedAccess()
  • Method Details

    • isAccessible

      public boolean isAccessible(String packageName)
      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, or null 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

      public void analyze(ResolvableType type)
      Analyze the specified type, including its full type signature.
      Parameters:
      type - the type to analyze
    • analyze

      public void analyze(Member member, ProtectedAccess.Options options)
      Analyze accessing the specified Member using the specified options.
      Parameters:
      member - the member to analyze
      options - the options to use