code: public static SymbolType valueOf(Type type, SymbolType arg, Map<String, SymbolType> updatedTypeMapping,
              Map<String, SymbolType> typeMapping) throws InvalidTypeException {
          if (typeMapping == null) {
              typeMapping = Collections.emptyMap();
          }
  
          SymbolType returnType = null;
          if (type instanceof Class<?>) {
              returnType = valueOfClass((Class<?>) type, arg, updatedTypeMapping, typeMapping);
          } else if (type instanceof TypeVariable) {
              return valueOfTypeVariable((TypeVariable<?>) type, arg, updatedTypeMapping, typeMapping);
          } else if (type instanceof ParameterizedType) {
              returnType = valueOfParameterizedType((ParameterizedType) type, arg, updatedTypeMapping, typeMapping);
          } else if (type instanceof GenericArrayType) {
              returnType = valueOfGenericArrayType((GenericArrayType) type, arg, updatedTypeMapping, typeMapping);
          } else if (type instanceof WildcardType) {
              returnType = valueOfWildcardType((WildcardType) type, arg, updatedTypeMapping, typeMapping);
          }
          return returnType;
  
      }
docs: Builds a symbol type from a Java type.
  
  @param type
  type to convert
  @param arg
  reference class to take into account if the type is a generic variable.
  @param updatedTypeMapping
  place to put the resolved generic variables.
  @param typeMapping
  reference type mapping for generic variables.
  @return the representative symbol type
  @throws InvalidTypeException when the type cannot be loaded