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 boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
matches(Annotation annotation)
Returnstrue
if this matcher matches the input annotation,false
otherwise.
-
-
-
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:AnnotationMatcher
Returnstrue
if this matcher matches the input annotation,false
otherwise.- Specified by:
matches
in interfaceAnnotationMatcher
- Parameters:
annotation
- the annotation- Returns:
true
if this matcher matches the input annotation,false
otherwise
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-