final String sourceObjectId = objectOrResult(request);
final Class<?> cls = forClass(request);
final String variableName = request.getRequiredProperty(NAME);
final String defaultObjectId = request.getOptionalProperty(DEFAULT);
final String scopeName = request.getOptionalProperty(SCOPE);
final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);
final RequestContext context = request.getContext();
final ObjectAdapter sourceObject = context.getMappedObject(sourceObjectId);
final boolean isSourceSet = sourceObject != null;
final boolean isSourceAssignable = isSourceSet && (cls == null || cls.isAssignableFrom(sourceObject.getObject().getClass()));