类 AccessControl

java.lang.Object
cn.taketoday.aot.generate.AccessControl

public final class AccessControl extends Object
Determine the access control of a Member or type signature.
从以下版本开始:
4.0
作者:
Stephane Nicoll, Phillip Webb
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • forMember

      public static AccessControl forMember(Member member)
      Create an AccessControl for the given member. This considers the member modifier, parameter types, return types and any enclosing classes. The lowest overall AccessControl.Visibility is used.
      参数:
      member - the source member
      返回:
      the AccessControl for the member
    • forResolvableType

      public static AccessControl forResolvableType(ResolvableType resolvableType)
      Create an AccessControl for the given ResolvableType. This considers the type itself as well as any generics.
      参数:
      resolvableType - the source resolvable type
      返回:
      the AccessControl for the type
    • forClass

      public static AccessControl forClass(Class<?> type)
      Create an AccessControl for the given Class.
      参数:
      type - the source class
      返回:
      the AccessControl for the class
    • lowest

      public static AccessControl lowest(AccessControl... candidates)
      Returns the lowest AccessControl from the given candidates.
      参数:
      candidates - the candidates to check
      返回:
      the lowest AccessControl from the candidates
    • getVisibility

      public AccessControl.Visibility getVisibility()
      Return the lowest AccessControl.Visibility of this instance.
      返回:
      the visibility
    • isPublic

      public boolean isPublic()
      Return whether the member or type signature backed by ths instance is accessible from any package.
      返回:
      true if it is public
    • isAccessibleFrom

      public boolean isAccessibleFrom(cn.taketoday.javapoet.ClassName type)
      Specify whether the member or type signature backed by this instance is accessible from the specified ClassName.
      参数:
      type - the type to check
      返回:
      true if it is accessible