Match bean and annotation

@param array $pointAry
@param array $classAry
@return bool
189526
private function matchBeanAndAnnotation(array $pointAry, array $classAry): bool
    {
        $intersectAry = \array_intersect($pointAry, $classAry);
        if (empty($intersectAry)) {
            return false;
        }

        return true;
    }
948337
public static boolean annotationTypeMatches(Class<? extends Annotation> type, JavacNode node) {
		if (node.getKind() != Kind.ANNOTATION) return false;
		return typeMatches(type, node, ((JCAnnotation) node.get()).annotationType);
	}
620982
public function matches(AbstractAnnotation $annotation) {
		if (!$annotation instanceof self) {
			return false;
		}
		if ($annotation->getType() !== $this->type) {
			return false;
		}

		return true;
	}
222676
@Override
  public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {
    if (!HAS_MUST_BE_CLOSED_ANNOTATION.matches(tree, state)) {
      return NO_MATCH;
    }
    if (CONSTRUCTOR.matches(tree, state)) {
      return NO_MATCH;
    }
    return matchNewClassOrMethodInvocation(tree, state);
  }
1061112
public static function getConstantsAnnotations($className, $annotationClassName = null)
    {
        if(null === $annotationClassName)
        {
            return static::$annotations[$className]['Constants'] ?? [];
        }
        $result = [];
        foreach(static::$annotations[$className]['Constants'] ?? [] as $constantName => $annotations)
        {
            foreach($annotations as $annotation)
            {
                if($annotation instanceof $annotationClassName)
                {
                    $result[$constantName][] = $annotation;
                }
            }
        }
        return $result;
    }
912179
public function isPropertyAnnotatedWith($className, $propertyName, $annotationClassName)
    {
        $className = $this->prepareClassReflectionForUsage($className);
        return isset($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES][$propertyName][self::DATA_PROPERTY_ANNOTATIONS][$annotationClassName]);
    }
166120
public function getAnnotationPointcuts(array &$pointcuts) : array
    {
        $keyPointcuts = [];
        foreach ($pointcuts as $key => $pointcut) {
            if ($pointcut->methodMatcher instanceof AnnotatedMatcher) {
                $key = $pointcut->methodMatcher->annotation;
            }
            $keyPointcuts[$key] = $pointcut;
        }

        return $keyPointcuts;
    }
1104159
public function matches(array $matchers, array $arguments): bool
    {
        $argumentCount = count($arguments);
        $index = 0;

        foreach ($matchers as $matcher) {
            if ($matcher instanceof WildcardMatcher) {
                $matchCount = 0;
                $innerMatcher = $matcher->matcher();

                while (
                    $index < $argumentCount &&
                    $innerMatcher->matches($arguments[$index])
                ) {
                    ++$matchCount;
                    ++$index;
                }

                $maximumArguments = $matcher->maximumArguments();

                $isMatch =
                    (
                        $maximumArguments < 0 ||
                        $matchCount <= $maximumArguments
                    ) &&
                    $matchCount >= $matcher->minimumArguments();

                if (!$isMatch) {
                    return false;
                }

                continue;
            }

            if (
                $index >= $argumentCount ||
                !$matcher->matches($arguments[$index])
            ) {
                return false;
            }

            ++$index;
        }

        return $index === $argumentCount;
    }
753994
private static boolean classIsJPAEntity(JavaClass cls) {
		AnnotationEntry[] annotations = cls.getAnnotationEntries();
		if (annotations != null) {
			for (AnnotationEntry annotation : annotations) {
				if ("Ljavax/persistence/Entity;".equals(annotation.getAnnotationType())) {
					return true;
				}
			}
		}

		return false;
	}
308991
public static boolean matches(Class<? extends Annotation> anno, String consName) {
		return VALIDATORS.get(anno).equals(consName);
	}
199421
public function matches(AbstractAnnotation $annotation) {
		if (!$annotation instanceof self) {
			return false;
		}
		$methodName = substr($annotation->getMethod(), 0, strpos($annotation->getMethod(), '('));
		if ($methodName !== substr($this->method, 0, strpos($this->method, '('))) {
			return false;
		}

		return true;
	}
113552
@GwtIncompatible("incompatible method")
    private static boolean annotationArrayMemberEquals(final Annotation[] a1, final Annotation[] a2) {
        if (a1.length != a2.length) {
            return false;
        }
        for (int i = 0; i < a1.length; i++) {
            if (!equals(a1[i], a2[i])) {
                return false;
            }
        }
        return true;
    }
1216212
public static function hasMethod(string $method, $objectOrClass): bool
    {
        try {
            $reflectionClass = self::getReflectionClass($objectOrClass);
            return $reflectionClass->hasMethod($method);
        } catch (Exception $e) {
            return false;
        }
    }
1057745
private boolean containsAnnotation(List<AnnotationExpr> annos, String annotationName) {
        for (AnnotationExpr anno : annos) {
            if (anno.getName().getName().equals(annotationName)) {
                return true;
            }
        }
        return false;
    }
609472
private <T> Class<? extends Annotation> matchAnnotationToScope(Annotation[] annotations) {

        for (Annotation next : annotations) {
            Class<? extends Annotation> nextType = next.annotationType();
            if (nextType.getAnnotation(BindingScope.class) != null) {
                return nextType;
            }
        }
        return DefaultBinding.class;
    }
761510
protected boolean isValidType(Class<?> type, Annotation[] classAnnotations) {
		if (type == null)
			return false;
		
		if (annotated) {
			return checkAnnotation(type);			
		} else if (scanpackages != null) {
			String classPackage = type.getPackage().getName();
			for (String pkg : scanpackages) {
				if (classPackage.startsWith(pkg)) {
					if (annotated) {
						return checkAnnotation(type);		
					} else
						return true;
				}
					
			}

			return false;
		} else if (clazzes != null) {
			for (Class<?> cls : clazzes) { // must strictly equal. Don't check
											// inheritance
				if (cls == type)
					return true;
			}

			return false;
		}

		return true;
	}
595079
public function getClassFilter(): PointFilter
    {
        if ($this->classFilter === null) {
            $this->classFilter = TruePointFilter::getInstance();
        }

        return $this->classFilter;
    }