private ResolvedType _fromAny(ClassStack context, Type mainType, TypeBindings typeBindings) { if (mainType instanceof Class<?>) { return _fromClass(context, (Class<?>) mainType, typeBindings); } if (mainType instanceof ParameterizedType) { return _fromParamType(context, (ParameterizedType) mainType, typeBindings); } if (mainType instanceof ResolvedType) { // Esp. TypePlaceHolder return (ResolvedType) mainType; } if (mainType instanceof GenericType<?>) { return _fromGenericType(context, (GenericType<?>) mainType, typeBindings); } if (mainType instanceof GenericArrayType) { return _fromArrayType(context, (GenericArrayType) mainType, typeBindings); } if (mainType instanceof TypeVariable<?>) { return _fromVariable(context, (TypeVariable<?>) mainType, typeBindings); } if (mainType instanceof WildcardType) { return _fromWildcard(context, (WildcardType) mainType, typeBindings); } // should never get here... throw new IllegalArgumentException("Unrecognized type class: "+mainType.getClass().getName()); }
private ResolvedType _fromAny(ClassStack context, Type mainType, TypeBindings typeBindings) { if (mainType instanceof Class<?>) { return _fromClass(context, (Class<?>) mainType, typeBindings); } if (mainType instanceof ParameterizedType) { return _fromParamType(context, (ParameterizedType) mainType, typeBindings); } if (mainType instanceof ResolvedType) { // Esp. TypePlaceHolder return (ResolvedType) mainType; } if (mainType instanceof GenericType<?>) { return _fromGenericType(context, (GenericType<?>) mainType, typeBindings); } if (mainType instanceof GenericArrayType) { return _fromArrayType(context, (GenericArrayType) mainType, typeBindings); } if (mainType instanceof TypeVariable<?>) { return _fromVariable(context, (TypeVariable<?>) mainType, typeBindings); } if (mainType instanceof WildcardType) { return _fromWildcard(context, (WildcardType) mainType, typeBindings); } // should never get here... throw new IllegalArgumentException("Unrecognized type class: "+mainType.getClass().getName()); }