Class BasicAnnotationMatcher
- java.lang.Object
-
- it.unive.lisa.program.annotations.matcher.BasicAnnotationMatcher
-
- All Implemented Interfaces:
AnnotationMatcher
public class BasicAnnotationMatcher extends java.lang.Object implements AnnotationMatcher
An annotation matcher based on the annotation name.
-
-
Constructor Summary
Constructors Constructor Description BasicAnnotationMatcher(Annotation annotation)Builds the matcher from the name of the annotation.BasicAnnotationMatcher(java.lang.String annotationName)Builds the matcher from the name of the annotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()booleanmatches(Annotation annotation)Returnstrueif this matcher matches the input annotation,falseotherwise.
-
-
-
Constructor Detail
-
BasicAnnotationMatcher
public BasicAnnotationMatcher(Annotation annotation)
Builds the matcher from the name of the annotation.- Parameters:
annotation- the annotation whose name is to be matched
-
BasicAnnotationMatcher
public BasicAnnotationMatcher(java.lang.String annotationName)
Builds the matcher from the name of the annotation.- Parameters:
annotationName- the name of the annotation
-
-
Method Detail
-
matches
public boolean matches(Annotation annotation)
Description copied from interface:AnnotationMatcherReturnstrueif this matcher matches the input annotation,falseotherwise.- Specified by:
matchesin interfaceAnnotationMatcher- Parameters:
annotation- the annotation- Returns:
trueif this matcher matches the input annotation,falseotherwise
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-