class LicensePolicyEvaluator extends AbstractPolicyEvaluator {

    private static final Logger LOGGER = Logger.getLogger(LicensePolicyEvaluator.class);

    /**
     * {@inheritDoc}
     */
    @Override
    public PolicyCondition.Subject supportedSubject() {
        return PolicyCondition.Subject.LICENSE;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<PolicyConditionViolation> evaluate(final Policy policy, final Component component) {<FILL_FUNCTION_BODY>}

}

        final List<PolicyConditionViolation> violations = new ArrayList<>();

        final List<PolicyCondition> policyConditions = super.extractSupportedConditions(policy);
        if (policyConditions.isEmpty()) {
            return violations;
        }

        // use spdx expression checking logic from the license group policy evaluator
        final SpdxExpression expression = LicenseGroupPolicyEvaluator.getSpdxExpressionFromComponent(component);

        boolean allPoliciesViolated = true;
        for (final PolicyCondition condition: super.extractSupportedConditions(policy)) {
            LOGGER.debug("Evaluating component (" + component.getUuid() + ") against policy condition (" + condition.getUuid() + ")");

            LicenseGroup licenseGroup = null;
            // lg will stay null if we are checking for "unresolved"
            if (!condition.getValue().equals("unresolved")) {
                License conditionLicense = qm.getObjectByUuid(License.class, condition.getValue());
                licenseGroup = LicenseGroupPolicyEvaluator.getTemporaryLicenseGroupForLicense(conditionLicense);
            }

            boolean addedViolation = LicenseGroupPolicyEvaluator.evaluateCondition(qm, condition, expression,
                    licenseGroup, component, violations);
            if (addedViolation == false) {
                allPoliciesViolated = false;
            }

        }
        return violations;
    
<methods>public non-sealed void <init>() ,public void setQueryManager(org.dependencytrack.persistence.QueryManager) <variables>protected org.dependencytrack.persistence.QueryManager qm