docs: private Object evaluateString(String strVal, ExtendedAttributeDefinition attrDef, EvaluationContext context) throws ConfigEvaluatorException {
          if (attrDef == null) {
              return strVal;
          }
  
          int type = attrDef.getType();
          if (type == AttributeDefinition.BOOLEAN) {
              return Boolean.valueOf(strVal);
          } else if (type == AttributeDefinition.BYTE) {
              return Byte.valueOf(strVal);
          } else if (type == AttributeDefinition.CHARACTER) {
              return Character.valueOf(strVal.charAt(0));
          } else if (type == AttributeDefinition.DOUBLE) {
              return Double.valueOf(strVal);
          } else if (type == AttributeDefinition.FLOAT) {
              return Float.valueOf(strVal);
          } else if (type == AttributeDefinition.INTEGER) {
              return Integer.valueOf(strVal);
          } else if (type == AttributeDefinition.LONG) {
              return Long.valueOf(strVal);
          } else if (type == AttributeDefinition.SHORT) {
              return Short.valueOf(strVal);
          } else if (type == MetaTypeFactory.DURATION_TYPE) {
              return MetatypeUtils.evaluateDuration(strVal, TimeUnit.MILLISECONDS);
          } else if (type == MetaTypeFactory.DURATION_S_TYPE) {
              return MetatypeUtils.evaluateDuration(strVal, TimeUnit.SECONDS);
          } else if (type == MetaTypeFactory.DURATION_M_TYPE) {
              return MetatypeUtils.evaluateDuration(strVal, TimeUnit.MINUTES);
          } else if (type == MetaTypeFactory.DURATION_H_TYPE) {
              return MetatypeUtils.evaluateDuration(strVal, TimeUnit.HOURS);
          } else if (type == MetaTypeFactory.PASSWORD_TYPE || type == MetaTypeFactory.HASHED_PASSWORD_TYPE) {
              return new SerializableProtectedString(strVal.toCharArray());
          } else if (type == MetaTypeFactory.ON_ERROR_TYPE) {
              return Enum.valueOf(OnError.class, strVal.trim().toUpperCase());
          } else if (type == MetaTypeFactory.TOKEN_TYPE) {
              return MetatypeUtils.evaluateToken(strVal);
          } else if (type == MetaTypeFactory.PID_TYPE) {
              return evaluateReference(strVal, attrDef, context);
          } else {
              // STRING and all other unknown/invalid types.
              return strVal;
          }
      }