public static class AccessibilityPredicate.PackageAccessibilityPredicate extends AccessibilityPredicate
The predicate is used to determine what can be accessed from a Randoop-generated JUnit test in the given package. So, this class does not implement Java's full accessibility rules; those for subclasses and default-accessibility are not relevant to this predicate.
AccessibilityPredicate.PackageAccessibilityPredicate| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
packageName
The package name from which to test accessibility of elements.
|
IS_ANY, IS_NOT_PRIVATE, IS_PUBLIC| Constructor and Description |
|---|
PackageAccessibilityPredicate(java.lang.String packageName)
Create a predicate that tests accessibility.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAccessible(java.lang.Class<?> c)
Determines whether this AccessibilityPredicate considers a
Class accessible. |
boolean |
isAccessible(java.lang.reflect.Executable e)
Determines whether this AccessibilityPredicate considers a
Method or Constructor accessible. |
boolean |
isAccessible(java.lang.reflect.Field f)
Determines whether this AccessibilityPredicate considers a
Field accessible. |
private boolean |
isAccessible(int mods,
java.lang.Package otherPackage)
Test accessibility as indicated by the modifier bit string and/or package.
|
java.lang.String |
toString() |
private final java.lang.String packageName
public PackageAccessibilityPredicate(java.lang.String packageName)
packageName.packageName - the package to use for package accessibility testpublic boolean isAccessible(java.lang.Class<?> c)
Class accessible.isAccessible in class AccessibilityPredicatec - the class object to checkpackageName, false otherwisepublic boolean isAccessible(java.lang.reflect.Executable e)
Method or Constructor accessible. Does not test the accessibility of the containing class.isAccessible in class AccessibilityPredicatee - the method/constructor object to checkpackageName
and not private, false otherwisepublic boolean isAccessible(java.lang.reflect.Field f)
Field accessible. Does not
test the accessibility of the containing class.isAccessible in class AccessibilityPredicatef - the field object to checkpackageName and not private,
false otherwiseprivate boolean isAccessible(int mods,
java.lang.Package otherPackage)
mods - the modifier bit stringotherPackage - the package to test for relative accessibilitypublic java.lang.String toString()
toString in class java.lang.Object