Package randoop.reflection
Class AccessibilityPredicate.PublicAccessibilityPredicate
- java.lang.Object
-
- randoop.reflection.AccessibilityPredicate
-
- randoop.reflection.AccessibilityPredicate.PublicAccessibilityPredicate
-
- Enclosing class:
- AccessibilityPredicate
private static class AccessibilityPredicate.PublicAccessibilityPredicate extends AccessibilityPredicate
PublicAccessibilityPredicate is aAccessibilityPredicate
that returns true in the case that the class/method/constructor/field is public.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class randoop.reflection.AccessibilityPredicate
AccessibilityPredicate.PackageAccessibilityPredicate
-
-
Field Summary
-
Fields inherited from class randoop.reflection.AccessibilityPredicate
IS_ANY, IS_NOT_PRIVATE, IS_PUBLIC
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PublicAccessibilityPredicate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isAccessible(int mods)
boolean
isAccessible(Class<?> c)
Determines whether this AccessibilityPredicate considers aClass
accessible.boolean
isAccessible(Executable e)
Determines whether this AccessibilityPredicate considers aMethod
orConstructor
accessible.boolean
isAccessible(Field f)
Determines whether this AccessibilityPredicate considers aField
accessible.String
toString()
-
-
-
Method Detail
-
isAccessible
public boolean isAccessible(Class<?> c)
Determines whether this AccessibilityPredicate considers aClass
accessible.- Specified by:
isAccessible
in classAccessibilityPredicate
- Parameters:
c
- the class object to check- Returns:
- true if class is declared public, false otherwise
-
isAccessible
public boolean isAccessible(Executable e)
Determines whether this AccessibilityPredicate considers aMethod
orConstructor
accessible. Does not test the accessibility of the containing class.- Specified by:
isAccessible
in classAccessibilityPredicate
- Parameters:
e
- the method/constructor object to check- Returns:
- true if method/constructor is declared public, false otherwise
-
isAccessible
public boolean isAccessible(Field f)
Determines whether this AccessibilityPredicate considers aField
accessible. Does not test the accessibility of the containing class.- Specified by:
isAccessible
in classAccessibilityPredicate
- Parameters:
f
- the field object to check- Returns:
- true if field is declared public, false otherwise
-
isAccessible
private boolean isAccessible(int mods)
-
-