Interface Rules
public interface Rules
Checks if access to a class member is allowed or denied, defined by a set of rules, built
using a
RulesBuilder
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Checks access to constructors or methods, for a specific class. -
Method Summary
Modifier and TypeMethodDescriptiondenialsForMethod
(CharSequence name, CharSequence descriptor) For the given method name and descriptor, return a map of classes which have an explicit deny rule against a matching method.forClass
(Module caller, CharSequence packageName, CharSequence className) Returns the rules for a specific target class, as specified by its package name and class name.default Rules.ForClass
Returns the rules for a specific target class.Returns theModuleLayer
that these rules apply to, which is applicable to the target classes.
-
Method Details
-
moduleLayer
ModuleLayer moduleLayer()Returns theModuleLayer
that these rules apply to, which is applicable to the target classes. -
forClass
Returns the rules for a specific target class, as specified by its package name and class name.- Parameters:
caller
- the module which contains the caller classpackageName
- package name must have '/' characters as separatorsclassName
- non-qualified class name- Returns:
- a non-null
ForClass
instance
-
forClass
Returns the rules for a specific target class.- Parameters:
caller
- the module which contains the caller classtarget
- the target class- Returns:
- a non-null
ForClass
instance
-
denialsForMethod
For the given method name and descriptor, return a map of classes which have an explicit deny rule against a matching method. If none match, the returned map is empty.- Parameters:
name
- method namedescriptor
- descriptor for the parameters, including parenthesis, but the return type is optional- Returns:
- a non-null map of fully qualified class names to deny rules; '/' characters are used as separators
-