htFetch method

dynamic htFetch(
  1. String varName
)

Implementation

dynamic htFetch(String varName) {
  switch (varName) {
    case 'toString':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          toString();
    case 'length':
      return length;
    case 'isEmpty':
      return isEmpty;
    case 'isNotEmpty':
      return isNotEmpty;
    case 'keys':
      return keys;
    case 'values':
      return values;
    case 'containsKey':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          containsKey(positionalArgs.first);
    case 'containsValue':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          containsValue(positionalArgs.first);
    case 'addAll':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          addAll(positionalArgs.first);
    case 'clear':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          clear();
    case 'remove':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          remove(positionalArgs.first);
    default:
      throw HTError.undefined(varName);
  }
}