class ProfileAttributesResolverImpl implements ProfileAttributesResolver {

    @Override
    @SuppressWarnings("unchecked")
    public <T extends Resource> T mergeResource(T resource) {
        boolean resolve = enabledResolving && !isSkipProfileAttributesResolving(resource);

        if (!resolve || excludedResourcesFromAttrResolving.contains(resource.getClass().getCanonicalName())) {
            return resource;
        }

        String resourceUri = resource.getURIString();
        Resource baseResourceCopy = copyBaseResource(resource);
        escapeBaseResourceFieldsFromResolving(resource);

        T resultResource = mergeObject(resource, resourceUri);
        revertEscapedBaseResourceFields(baseResourceCopy, resultResource);
        revertEscapedBaseResourceFields(baseResourceCopy, resource);

        return resultResource;
    }

    public  ProfileAttributesResolverImpl();

}