Class AccessControl
java.lang.Object
org.springframework.aot.generate.AccessControl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum -
Method Summary
Modifier and TypeMethodDescriptionstatic 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(org.springframework.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.
-
Method Details
-
forMember
Create anAccessControlfor the given member. This considers the member modifier, parameter types, return types and any enclosing classes. The lowest overallAccessControl.Visibilityis used.- Parameters:
member- the source member- Returns:
- the
AccessControlfor the member
-
forResolvableType
Create anAccessControlfor the givenResolvableType. This considers the type itself as well as any generics.- Parameters:
resolvableType- the source resolvable type- Returns:
- the
AccessControlfor the type
-
forClass
Create anAccessControlfor the givenClass.- Parameters:
type- the source class- Returns:
- the
AccessControlfor the class
-
lowest
Returns the lowestAccessControlfrom the given candidates.- Parameters:
candidates- the candidates to check- Returns:
- the lowest
AccessControlfrom the candidates
-
getVisibility
Return the lowestAccessControl.Visibilityof this instance.- Returns:
- the visibility
-
isPublic
public boolean isPublic()Return whether the member or type signature backed by ths instance is accessible from any package.- Returns:
trueif it is public
-
isAccessibleFrom
public boolean isAccessibleFrom(org.springframework.javapoet.ClassName type) Specify whether the member or type signature backed by this instance is accessible from the specifiedClassName.- Parameters:
type- the type to check- Returns:
trueif it is accessible
-