public boolean matches()

in cdi-build-tools/src/main/java/org/apache/aries/cdi/build/tools/AddExtensionRequirement.java [101:133]


	public boolean matches(TypeDescription typeDescription) {
		if (typeDescription.isPackageType()) {
			return false;
		}

		if (isAnnotatedWith(Requirements.class).matches(typeDescription)) {
			AnnotationDescription[] annotationDescriptions = typeDescription.getDeclaredAnnotations().ofType(Requirements.class).getValue(requirementsValue).resolve(AnnotationDescription[].class);

			if (Arrays.asList(annotationDescriptions).contains(annotationDescription)) {
				return false;
			}
		}

		String className = typeDescription.getName();
		String packageName = typeDescription.getPackage().getName();

		boolean matches = false;
		switch (match) {
			case CLASS: {
				matches = className.equals(name);
				break;
			}
			case PACKAGE: {
				matches = packageName.equals(name);
				break;
			}
			case PREFIX: {
				matches = packageName.startsWith(name);
			}
		}

		return matches;
	}