class FileProfileActivator extends DetectedProfileActivator implements LogEnabled {
    private Logger logger;

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

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

    public void enableLogging(Logger logger) {
        this.logger = logger;
    }
}

        Activation activation = profile.getActivation();

        ActivationFile actFile = activation.getFile();

        if (actFile != null) {
            // check if the file exists, if it does then the profile will be active
            String fileString = actFile.getExists();

            RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
            try {
                interpolator.addValueSource(new EnvarBasedValueSource());
            } catch (IOException e) {
                // ignored
            }
            interpolator.addValueSource(new MapBasedValueSource(System.getProperties()));

            try {
                if (fileString != null && !fileString.isEmpty()) {
                    fileString = interpolator.interpolate(fileString, "").replace("\\", "/");
                    File file = new File(fileString);
                    return file.exists();
                }

                // check if the file is missing, if it is then the profile will be active
                fileString = actFile.getMissing();

                if (fileString != null && !fileString.isEmpty()) {
                    fileString = interpolator.interpolate(fileString, "").replace("\\", "/");
                    File file = new File(fileString);
                    return !file.exists();
                }
            } catch (InterpolationException e) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Failed to interpolate missing file location for profile activator: " + fileString, e);
                } else {
                    logger.warn("Failed to interpolate missing file location for profile activator: " + fileString
                            + ", enable verbose output (-X) for more details");
                }
            }
        }

        return false;
    
<methods>public non-sealed void <init>() ,public boolean canDetermineActivation(Profile) <variables>