code: public GenuineVariableDescriptor extractVariableDescriptor(HeuristicConfigPolicy configPolicy,
              EntityDescriptor entityDescriptor) {
          entityDescriptor = downcastEntityDescriptor(configPolicy, entityDescriptor);
          if (variableName != null) {
              GenuineVariableDescriptor variableDescriptor = entityDescriptor.getGenuineVariableDescriptor(variableName);
              if (variableDescriptor == null) {
                  throw new IllegalArgumentException("The selectorConfig (" + this
                          + ") has a variableName (" + variableName
                          + ") which is not a valid planning variable on entityClass ("
                          + entityDescriptor.getEntityClass() + ").\n"
                          + entityDescriptor.buildInvalidVariableNameExceptionMessage(variableName));
              }
              return variableDescriptor;
          } else if (mimicSelectorRef != null) {
              return configPolicy.getValueMimicRecorder(mimicSelectorRef).getVariableDescriptor();
          } else {
              return null;
          }
      }
docs: ************************************************************************