Class InClassCriterion
java.lang.Object
org.checkerframework.afu.annotator.find.InClassCriterion
- All Implemented Interfaces:
Criterion
Represents the criterion that a program element is in a class with a particular name.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.afu.annotator.find.Criterion
Criterion.Kind
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInClassCriterion
(@ClassGetName String className, boolean exactMatch) Creates a new InClassCriterion. -
Method Summary
Modifier and TypeMethodDescriptiongetKind()
Gets the type of this criterion.boolean
Returns true if this Criterion only permits type annotations, not declaration annotations.boolean
isSatisfiedBy
(@Nullable TreePath path) Determines if the given tree path is satisfied by this criterion.boolean
isSatisfiedBy
(@Nullable TreePath path, Tree leaf) Determines if the given tree path is satisfied by this criterion.static boolean
isSatisfiedBy
(@Nullable TreePath path, String className, boolean exactMatch) toString()
-
Field Details
-
className
The class name.
-
-
Constructor Details
-
InClassCriterion
Creates a new InClassCriterion.- Parameters:
className
- the class nameexactMatch
- if true, require an exact match
-
-
Method Details
-
getKind
Description copied from interface:Criterion
Gets the type of this criterion. -
isSatisfiedBy
Description copied from interface:Criterion
Determines if the given tree path is satisfied by this criterion.- Specified by:
isSatisfiedBy
in interfaceCriterion
- Parameters:
path
- the tree path to check against. May be null (in which case the result is false), for example in a call such asthis.isSatisfiedBy(path.getParentPath())
.- Returns:
- true if this criterion is satisfied by the given path, false otherwise
-
isSatisfiedBy
Description copied from interface:Criterion
Determines if the given tree path is satisfied by this criterion.- Specified by:
isSatisfiedBy
in interfaceCriterion
- Parameters:
path
- the tree path to check against. May be null (in which case the result is false), for example in a call such asthis.isSatisfiedBy(path.getParentPath())
.- Returns:
- true if this criterion is satisfied by the given path, false otherwise
-
isSatisfiedBy
-
isOnlyTypeAnnotationCriterion
public boolean isOnlyTypeAnnotationCriterion()Description copied from interface:Criterion
Returns true if this Criterion only permits type annotations, not declaration annotations.- Specified by:
isOnlyTypeAnnotationCriterion
in interfaceCriterion
- Returns:
- true if this Criterion only permits type annotations, not declaration annotations
-
toString
-