Returns the runtime representation of the given type.

This corresponds to the notion of the erasure in JSR-14.
328683
public static <T> Class<T> erasure(Type t) {
        return eraser.visit(t,null);
    }
102774
private String toPrettyPrintedStack(String type) {
        StringBuilder result = new StringBuilder();
        StringBuilder spaces = new StringBuilder();
        result.append("Unable to serialize class: ");
        result.append(type);
        result.append("\nField hierarchy is:");
        for (Iterator<TraceSlot> i = traceStack.listIterator(); i.hasNext();) {
            spaces.append("  ");
            TraceSlot slot = i.next();
            result.append("\n").append(spaces).append(slot.fieldDescription);
            result.append(" [class=").append(slot.object.getClass().getName());
            result.append("]");
        }
        result.append(" <----- field that is not serializable");
        return result.toString();
    }
789929
@UsedByGeneratedCode
	public static ReloadableType getReloadableType(int typeRegistryId, int typeId) {
		if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) {
			log.info(
					">TypeRegistry.getReloadableType(typeRegistryId=" + typeRegistryId + ",typeId=" + typeId + ")");
		}
		TypeRegistry typeRegistry = registryInstances[typeRegistryId].get();
		if (typeRegistry == null) {
			throw new IllegalStateException("Request to access registry id " + typeRegistryId
					+ " but no registry with that id has been created");
		}
		ReloadableType reloadableType = typeRegistry.getReloadableType(typeId);
		if (reloadableType == null) {
			throw new IllegalStateException("The type registry " + typeRegistry + " does not know about type id "
					+ typeId);
		}
		reloadableType.setResolved();
		if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) {
			log.info("<TypeRegistry.getReloadableType(typeRegistryId=" + typeRegistryId + ",typeId=" + typeId
					+ ") returning " + reloadableType);
		}
		reloadableType.createTypeAssociations();
		return reloadableType;
	}
54282
protected ModificationHistory getModificationHistory(Type type) {
		ModificationHistory history = new ModificationHistory();
		ClassDoc classDoc = this.wrDoc.getConfiguration().root.classNamed(type.qualifiedTypeName());
		if (classDoc != null) {
			LinkedList<ModificationRecord> list = this.getModificationRecords(classDoc);
			history.addModificationRecords(list);
		}
		return history;
	}
111583
public JType getGenericReturnType()
  {
    try {
      Type retType = _method.getGenericReturnType();

      if (retType instanceof Class)
  return _loader.forName(((Class) retType).getName());
      else
  return new JTypeWrapper(_loader, (ParameterizedType) retType);
    } catch (NoSuchMethodError e) {
      return getReturnType();
    }

  }
234056
private Type getAppropriateType(Class<?> type, Type genericType)
    {    
        return type.equals(genericType) ? type : genericType;
    }
353599
public com.google.protobuf.ByteString
      getRuntimeBytes() {
    java.lang.Object ref = runtime_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      runtime_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
551224
protected String getUniqueIdentifier(JvmType type) {
		String typeIdentifier = type.getIdentifier();
		if (type instanceof JvmTypeParameter) {
			JvmIdentifiableElement declarator = (JvmIdentifiableElement) ((JvmTypeParameter) type).getDeclarator();
			// may happen in unit tests
			if (declarator != null) {
				typeIdentifier = typeIdentifier + ":" + declarator.getQualifiedName();
			} else {
				typeIdentifier = typeIdentifier + ":";
			}
		}
		return typeIdentifier;
	}
56264
static final JSType createIterableTypeOf(JSType elementType, JSTypeRegistry typeRegistry) {
    return typeRegistry.createTemplatizedType(
        typeRegistry.getNativeObjectType(ITERABLE_TYPE), elementType);
  }
17321
public static synchronized UnsupportedDurationField getInstance(DurationFieldType type) {
        UnsupportedDurationField field;
        if (cCache == null) {
            cCache = new HashMap<DurationFieldType, UnsupportedDurationField>(7);
            field = null;
        } else {
            field = cCache.get(type);
        }
        if (field == null) {
            field = new UnsupportedDurationField(type);
            cCache.put(type, field);
        }
        return field;
    }
1078264
private ByteBuffer getBytesAccordingToType(String object, AbstractType<?> comparator)
    {
        if (comparator == null) // default comparator is BytesType
            comparator = BytesType.instance;

        try
        {
            return comparator.fromString(object);
        }
        catch (MarshalException e)
        {
            throw new RuntimeException(e);
        }
    }
47756
private static Class<?> getRawClass(Type type) {
    if (type instanceof Class) {
      return (Class<?>) type;
    }
    if (type instanceof ParameterizedType) {
      return getRawClass(((ParameterizedType) type).getRawType());
    }
    // For TypeVariable and WildcardType, returns the first upper bound.
    if (type instanceof TypeVariable) {
      return getRawClass(((TypeVariable) type).getBounds()[0]);
    }
    if (type instanceof WildcardType) {
      return getRawClass(((WildcardType) type).getUpperBounds()[0]);
    }
    if (type instanceof GenericArrayType) {
      Class<?> componentClass = getRawClass(((GenericArrayType) type).getGenericComponentType());
      return Array.newInstance(componentClass, 0).getClass();
    }
    // This shouldn't happen as we captured all implementations of Type above (as or Java 8)
    throw new IllegalArgumentException("Unsupported type " + type + " of type class " + type.getClass());
  }
854627
@Override
	public JvmType getType() {
		if (this.type == null) {
//			// make sure scoping has taken place and installed an IJvmTypeProvider
//			if (returnType != null)
//				returnType.getType();
			JvmType newType = TypesFactory.eINSTANCE.createJvmVoid();
			((InternalEObject)newType).eSetProxyURI(computeTypeUri(isProcedure()));
			type = (JvmType) eResolveProxy((InternalEObject) newType);
		}
		return super.getType();
	}
546783
@Override
  public OperationHandle getTypeInfo(SessionHandle sessionHandle) throws HiveSQLException {
    try {
      TGetTypeInfoReq req = new TGetTypeInfoReq(sessionHandle.toTSessionHandle());
      TGetTypeInfoResp resp = cliService.GetTypeInfo(req);
      checkStatus(resp.getStatus());
      TProtocolVersion protocol = sessionHandle.getProtocolVersion();
      return new OperationHandle(resp.getOperationHandle(), protocol);
    } catch (HiveSQLException e) {
      throw e;
    } catch (Exception e) {
      throw new HiveSQLException(e);
    }
  }
943757
public TypeInformation<T> getType() {
		if (type instanceof MissingTypeInfo) {
			MissingTypeInfo typeInfo = (MissingTypeInfo) type;
			throw new InvalidTypesException("The return type of function '" + typeInfo.getFunctionName()
					+ "' could not be determined automatically, due to type erasure. "
					+ "You can give type information hints by using the returns(...) method on the result of "
					+ "the transformation call, or by letting your function implement the 'ResultTypeQueryable' "
					+ "interface.", typeInfo.getTypeException());
		}
		typeUsed = true;
		return this.type;
	}
745367
public IType getType()
  {
    IType type = getTypeImpl();
    if (TypeSystem.isDeleted(type)) {
      type = TypeSystem.getErrorType();
    }
    return type;
  }
1257629
public static Type getSuperType(Type type) {
        if (type instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) type;
            Type genericSuperClass = ((Class<?>) parameterizedType.getRawType()).getGenericSuperclass();
            if (genericSuperClass instanceof ParameterizedType) {
                /*
                 * Find erased generic types for the super class and replace
                 * with actual type arguments from the parameterized type
                 */
                Type[] superTypeArguments = getTypeArguments(genericSuperClass);
                List<Type> typeParameters = Arrays.asList(((Class<?>) parameterizedType.getRawType()).getTypeParameters());
                int j = 0;
                for (int i = 0; i != superTypeArguments.length; i++) {
                    if (typeParameters.contains(superTypeArguments[i])) {
                        superTypeArguments[i] = parameterizedType.getActualTypeArguments()[j++];
                    }
                }
                return new ParameterizedType() {
                    @Override
                    public Type[] getActualTypeArguments() {
                        return superTypeArguments;
                    }

                    @Override
                    public Type getRawType() {
                        return ((ParameterizedType) genericSuperClass).getRawType();
                    }

                    @Override
                    public Type getOwnerType() {
                        return null;
                    }
                };
            } else {
                return genericSuperClass;
            }
        } else {
            return ((Class<?>) type).getGenericSuperclass();
        }
    }