类 AccessControl
java.lang.Object
cn.taketoday.aot.generate.AccessControl
Determine the access control of a
Member or type signature.- 从以下版本开始:
- 4.0
- 作者:
- Stephane Nicoll, Phillip Webb
-
嵌套类概要
嵌套类修饰符和类型类说明static enum -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static AccessControlCreate anAccessControlfor the givenClass.static AccessControlCreate anAccessControlfor the given member.static AccessControlforResolvableType(ResolvableType resolvableType) Create anAccessControlfor the givenResolvableType.Return the lowestAccessControl.Visibilityof this instance.booleanisAccessibleFrom(cn.taketoday.javapoet.ClassName type) Specify whether the member or type signature backed by this instance is accessible from the specifiedClassName.booleanisPublic()Return whether the member or type signature backed by ths instance is accessible from any package.static AccessControllowest(AccessControl... candidates) Returns the lowestAccessControlfrom the given candidates.
-
字段详细资料
-
target
-
visibility
-
-
构造器详细资料
-
AccessControl
AccessControl(Class<?> target, AccessControl.Visibility visibility)
-
-
方法详细资料
-
forMember
Create anAccessControlfor the given member. This considers the member modifier, parameter types, return types and any enclosing classes. The lowest overallAccessControl.Visibilityis used.- 参数:
member- the source member- 返回:
- the
AccessControlfor the member
-
forResolvableType
Create anAccessControlfor the givenResolvableType. This considers the type itself as well as any generics.- 参数:
resolvableType- the source resolvable type- 返回:
- the
AccessControlfor the type
-
forClass
Create anAccessControlfor the givenClass.- 参数:
type- the source class- 返回:
- the
AccessControlfor the class
-
lowest
Returns the lowestAccessControlfrom the given candidates.- 参数:
candidates- the candidates to check- 返回:
- the lowest
AccessControlfrom the candidates
-
getVisibility
Return the lowestAccessControl.Visibilityof this instance.- 返回:
- the visibility
-
isPublic
public boolean isPublic()Return whether the member or type signature backed by ths instance is accessible from any package.- 返回:
trueif 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 specifiedClassName.- 参数:
type- the type to check- 返回:
trueif it is accessible
-