class JdkPrefixProfileActivator extends DetectedProfileActivator {
    private static final String JDK_VERSION = System.getProperty("java.version");

    public boolean isActive(Profile profile) throws ProfileActivationException {<FILL_FUNCTION_BODY>}

    private boolean matchJdkVersionRange(String jdk) throws InvalidVersionSpecificationException {
        VersionRange jdkVersionRange = VersionRange.createFromVersionSpec(convertJdkToMavenVersion(jdk));
        DefaultArtifactVersion jdkVersion = new DefaultArtifactVersion(convertJdkToMavenVersion(getJdkVersion()));
        return jdkVersionRange.containsVersion(jdkVersion);
    }

    private String convertJdkToMavenVersion(String jdk) {
        return jdk.replace("_", "-");
    }

    protected String getJdkVersion() {
        return JDK_VERSION;
    }

    protected boolean canDetectActivation(Profile profile) {
        return profile.getActivation() != null
                && profile.getActivation().getJdk() != null
                && !profile.getActivation().getJdk().isEmpty();
    }
}

        Activation activation = profile.getActivation();

        String jdk = activation.getJdk();

        // null case is covered by canDetermineActivation(), so we can do a straight startsWith() here.
        if (jdk.startsWith("[") || jdk.startsWith("(")) {
            try {
                return matchJdkVersionRange(jdk);
            } catch (InvalidVersionSpecificationException e) {
                throw new ProfileActivationException(
                        "Invalid JDK version in profile '" + profile.getId() + "': " + e.getMessage());
            }
        }

        boolean reverse = false;

        if (jdk.startsWith("!")) {
            reverse = true;
            jdk = jdk.substring(1);
        }

        if (getJdkVersion().startsWith(jdk)) {
            return !reverse;
        } else {
            return reverse;
        }
    
<methods>public non-sealed void <init>() ,public boolean canDetermineActivation(Profile) <variables>