Package com.tnsai.security
Record Class AccessDeclaration
java.lang.Object
java.lang.Record
com.tnsai.security.AccessDeclaration
Collects restrictions from the actual target hierarchy; no method-first security replacement.
-
Constructor Summary
ConstructorsConstructorDescriptionAccessDeclaration(List<ExecutionRule> rules, List<Security> security) Creates an instance of aAccessDeclarationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandeclared()final booleanIndicates whether some other object is "equal to" this one.static AccessDeclarationforType(Class<?> hostType, Method method, ExecutionRule dynamicRule) final inthashCode()Returns a hash code value for this object.booleanstatic AccessDeclarationresolve(Object target, Method method, ExecutionRule dynamicRule) rules()Returns the value of therulesrecord component.security()Returns the value of thesecurityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AccessDeclaration
Creates an instance of aAccessDeclarationrecord class.- Parameters:
rules- the value for therulesrecord componentsecurity- the value for thesecurityrecord component
-
-
Method Details
-
protectedAccess
public boolean protectedAccess() -
declared
public boolean declared() -
resolve
-
forType
public static AccessDeclaration forType(Class<?> hostType, Method method, ExecutionRule dynamicRule) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
rules
Returns the value of therulesrecord component.- Returns:
- the value of the
rulesrecord component
-
security
Returns the value of thesecurityrecord component.- Returns:
- the value of the
securityrecord component
-